T-SQL: Basic Concepts


T-SQL is a procedural language with all the gravy and relish you might be accustomed to having in a language. Architecturally speaking, it can be compared to database programming languages like Clipper and DBase because it comes with all the basic elements of a programming language: variables, flow-control structures, logic evaluation, function and procedure call capability, and so on. (Yes, even GOTO lives on here.) That’s the “Transact” or “T” part of the language. However, T-SQL is neither compiled like C nor interpreted like a p-code language. Rather, it is parsed like a just-in-time script language, and its intent and logic is converted into a native “sublanguage” that stokes the SQL Server engines.

The SQL in T-SQL supports SQL-92 through SQL-2003 DDL and DML that allow a wide range of database programmers who are up to speed on SQL to obtain a broad range of database server functionality, and then some. If you have never studied T-SQL before reading this book, but you know SQL, then you are certainly not a long way from being able to create applications that access SQL Server. Many database programmers coming over from the Access, FoxPro, Delphi, PowerBuilder, and JDBC worlds, for instance, are usually up to speed with SQL, and so getting up to speed with SQL Server is very easy. And because SQL is so widely used, I have left the SQL-native facilities like SELECT, UPDATE, INSERT, and JOIN for discussion in later chapters, where it is assumed you already know how to program in SQL.

T-SQL also provides access to DBMS mechanisms such as stored procedures and triggers. These are not defined by the SQL standard (which is the base language for all SQL extended DBMS interfaces), although some attempt at adding stored procedure-like facilities in SQL has been proposed in recent years. But hold your horses, we’ll be getting the extended stuff like stored procedures in later chapters.




Microsoft SQL Server 2005. The Complete Reference
Microsoft SQL Server 2005: The Complete Reference: Full Coverage of all New and Improved Features
ISBN: 0072261528
EAN: 2147483647
Year: 2006
Pages: 239

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