Where to Begin


Where should we begin? This is one of those chicken and egg questions. Before you can query data, you have to have it stored somewhere. I think it would be a bit distracting to start from the very beginning and step through the entire process to create a new database. For simplicity's sake, I'd like to start out working with data stored in an existing database so we don't get too far off topic. I'll cover DDL and DCL statements, used primarily for database construction and administration, at the end of this chapter.

You'll be working with the Adventure Works Cycles sample database. The versions of this database that Microsoft includes with SQL Server 2000 and SQL Server 2005 are quite different. The SQL Server 2005 version includes some complexity that I felt was unnecessary for this book. This is why the AdventureWorks2000 for both versions of SQL Server is used for the examples. Please double-check that you have this database available to you and, if not, refer to the instructions in Chapter 2.

Because you've already learned the basics of using the Query Analyzer for SQL Server 2000 and the Query Editor in the SQL Server 2005 Management Studio, I'm not going to be giving you specific instructions regarding the use of these tools. The purpose here is to focus on the language. If you need to, review these instructions in Chapter 2. To begin, open Query Analyzer or the SQL Server Management Studio Query Editor and connect to your database server.




Beginning Transact-SQL with SQL Server 2000 and 2005
Beginning Transact-SQL With SQL Server 2000 and 2005
ISBN: 076457955X
EAN: 2147483647
Year: 2006
Pages: 131
Authors: Paul Turley

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net