Constructing an SQL Statement

ODBC applications perform almost all of their database access by executing SQL statements. The form of these statements depends on the needs of the application. SQL statements can be constructed in the following ways:

The Microsoft® SQL Server™ ODBC driver parses SQL statements only for ODBC and SQL-92 syntax not directly supported by the database engine, which the driver transforms into Transact-SQL. All other SQL syntax is passed to the database engine unchanged, where SQL Server will determine if it is valid Transact-SQL. This approach yields two benefits:

The column list in a SELECT statement should contain only the columns needed to perform the task at hand. Not only does this reduce the amount of data sent across the network, it also reduces the effect of database changes on the application. If an application does not reference a column from a table, then the application is not affected by any changes made to that column.

To use statements

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.