Using SQL (Structured Query Language)

See AlsovbhowSQLOverviewSee

You can use SQL, or Structured Query Language, to query, update, and manage relational databases.

You can use SQL statements29F05E5 in most places where you can enter the name of a table, query, or field.  For example, you can enter an SQL statement as the setting for the RecordSource property of a data control.  In the Professional Edition, you can also use an SQL statement in code to create a Dynaset or Snapshot.

The SQL syntax described here is for use with Visual Basic or Microsoft Access database engines. In cases where you use an external ODBC server (such as Microsoft SQL Server or Oracle) to execute SQL statements, your SQL syntax will need to conform to the SQL dialect used by the external server. In many cases, the SQL described here will function without change on external servers.

To learn more about the parts of an SQL SELECT statement, click one of the topics below.

         SELECTZUPF0W fieldlist

         FROMDQDO8P tablenames IN34L38G databasename

         WHERE4DMR9SH searchconditions

         GROUP BY61THXA8 fieldlist

         HAVING2HNJY0 searchconditions

         ORDER BY15DW835 fieldlist


Note   Although some of the SQL statements shown in the examples are written on several lines to make them easier to read, an SQL statement  can be a single line or string.  Also, in these examples, the SQL keywords are in upper case, but case is not significant in the functionality.  The following is a valid SQL statement:

SELECT [Last Name], [First Name] FROM Employees WHERE Salary > 21000