SQL Commands and Functions

Visual FoxPro supports Structured Query Language (SQL) commands and functions. Visual FoxPro's SQL commands make use of Rushmore Query Optimization technology to optimize performance, and a single SQL command can be used to replace multiple Visual FoxPro commands.

Visual FoxPro supports the following:

  • ALTER TABLE - SQL Command
    Modifies an existing table. You can modify the name, type, precision, scale, null value support, and referential integrity rules for each field in the table.
  • CREATE CURSOR - SQL Command
    Creates a temporary table. Each field in the temporary table is defined with a name, type, precision, scale, null value support, and referential integrity rules. These definitions can be obtained from the command itself or from an array.
  • CREATE TABLE - SQL Command
    Creates a table. Each new table field is defined with a name, type, precision, scale, null value support, and referential integrity rules. These definitions can be obtained from the command itself or from an array.
  • INSERT - SQL Command
    Appends a new record to the end of an existing table. The new record contains data listed in the INSERT command or from an array.
  • SELECT - SQL Command
    Specifies the criteria on which a query is based and issues the query. Visual FoxPro interprets the query and retrieves the specified data from the table(s). The SELECT command is built into Visual FoxPro like any other Visual FoxPro command. You can create a SELECT command query in these areas:

    • In the Command window.

    • In a Visual FoxPro program (like any other Visual FoxPro command).

    • In the Query Designer.

  • SQLCOLUMNS( ) Function
    Stores a list of column names and information about each column for the specified data source table to a Visual FoxPro cursor.
  • SQLEXEC( ) Function
    Sends an SQL statement to the data source, where the statement is processed.
  • UPDATE - SQL Command
    Updates records in a table. The records can be updated based on the results of a SELECT - SQL statement.

See Also

Reference

CREATE QUERY Command
MODIFY QUERY Command

Other Resources

Language Reference (Visual FoxPro)