Friday, December 01, 2006

SQL Server Tutorial

This tutorial is found here: http://www.functionx.com/sqlserver/Lesson01.htm

Your start and stop the server using the SQL Server Service Manager. This is installed on my current machine.

Introduction

Can open database from Query Analyzer or Enterprise Manager.

SQL

SQL Server 'highly adheres' to the SQL standard. However, there are internal detail that may not apply to other databases.

the SQL command are run internally through an interpreter.

SQL is not case sensitive. It is tradition to write all SQL key words in uppercase.

What are the different way to bring up a SQL Query Analyzer?

  1. From the start menu.
  2. You can also get to from inside the Enterprise Manager
The issue of the semicolon seems to be a problem. It is not really used.

SQL Server uses the 'GO' statement for a set of statements to be processed.

Can easily create a database from SQL Analyzer using:

CREATE databasename;

I think I should use semicolons so that the SQL code is more portable.

Using SQL Analyzer for a simple query is quick and probably not as prone to crashing.

Collation Name - a collation is bit patterns that represent each character and rules by which the characters are sorted and compared.

When a SQL Server database is created it creates 20 tables that define things about the database.

The post fix for a SQL Server database file is 'MDF'.

The 'Compatibility Level' is the version of SQL Server under which the database was created. Database created in SLQ Server 2000 are 80. This value seem to correspond one-to-one with the version, version 8.0 is 80, and version 6.5 is 65, etc.

'GO' is a set SQL Server statements indicates the end of a batch of Transact-SQL statments. It is a utility command that requires no permissions so it can be executed by any user.

The 'USE' statement will change the database in the SQL Analyzer Query window.

Is DECLARE an SQL statement or just a Transact-SQL statement?

The SQL Server GUI in SQL Server Enterprise Manager has many similarities with ACCESS.

SQL Server has a whole bunch of store procedures:

sp_help
sp_rename
sp_who

No comments: