background preloader

SQL Command List

Facebook Twitter

SQL Tutorial. SQL - Indexes. Indexes are special lookup tables that the database search engine can use to speed up data retrieval. Simply put, an index is a pointer to data in a table. An index in a database is very similar to an index in the back of a book. For example, if you want to reference all pages in a book that discuss a certain topic, you first refer to the index, which lists all topics alphabetically and are then referred to one or more specific page numbers. An index helps speed up SELECT queries and WHERE clauses, but it slows down data input, with UPDATE and INSERT statements. Creating an index involves the CREATE INDEX statement, which allows you to name the index, to specify the table and which column or columns to index, and to indicate whether the index is in ascending or descending order.

Indexes can also be unique, similar to the UNIQUE constraint, in that the index prevents duplicate entries in the column or combination of columns on which there's an index. The CREATE INDEX Command: Unique Indexes: SQL UNION Operator. 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: 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. Creates a temporary table. Displays the View Designer, allowing you to create an SQL view. Creates a table. Marks records in a table for deletion using SQL syntax.

Appends a new record to the end of an existing table. Specifies the criteria on which a query is based and issues the query. Makes it possible for you to execute stored procedures on a host database such as Microsoft SQL Server. Requests cancellation of an executing SQL statement Commits a transaction. Establishes a connection to a data source. How to import a SQL file using the command line in MySQL? SQL Tutorial - Table Of Content | 1Keydata. SQL Tutorial - SQL Query Reference and Programming Examples. SQL (Structured Query Language) is a computer language aimed to store, manipulate, and query data stored in relational databases. The first incarnation of SQL appeared in 1974, when a group in IBM developed the first prototype of a relational database. The first commercial relational database was released by Relational Software (later becoming Oracle). Standards for SQL exist. However, the SQL that can be used on each one of the major RDBMS today is in different flavors.

This is due to two reasons: 1) the SQL command standard is fairly complex, and it is not practical to implement the entire standard, and 2) each database vendor needs a way to differentiate its product from others. This SQL programming help site lists commonly-used SQL statements, and is divided into the following sections: For each command, the SQL syntax will first be presented and explained, followed by an example. Although it is a good idea to go through this tutorial in the above order, it is not required. SQL Commands and Functions. Using SQL Commands. This section provides information on how to use SQL Commands to create, edit, view, run, and delete SQL commands. This section contains the following topics: What is SQL Commands? You can use SQL Commands to create, edit, view, run, and delete SQL commands. A SQL command can contain SQL statements or PL/SQL blocks. When using SQL Commands, remember the following: SQL commands created in the Query Builder can be accessed in SQL Commands.Saved SQL commands must have names unique within a given workspace.There is no interaction between SQL Commands and SQL Scripts.You can cut and paste a SQL command from SQL Commands to run in the SQL Script Editor.

Accessing SQL Commands To access SQL Commands: Log in to the Workspace home page.The Workspace home page appears.To view the SQL Commands home page you can either:Click SQL Workshop and then SQL Commands to drill-down to the SQL Commands home page.Click the down arrow on the right side of the SQL Workshop icon to view a drop down menu. Autocommit. SQL Commands. This document discusses SQL commands used by Oracle Lite.

Topics include: This section lists Oracle Lite SQL commands, clauses, and pseudocolumns in alphabetical order and discusses each. The discussion includes the following: Syntax BNF Notation Purpose Prerequisites Argument and Descriptions Usage Notes Examples Related Topics ODBC Functionality (where relevant) Syntax Figure 4-1 The ALTER SEQUENCE Command BNF Notation ALTER SEQUENCE [schema .] sequence [(INCREMENT BY "integer" | (MAXVALUE "integer" | NOMAXVALUE) | (MINVALUE "integer" | NOMINVALUE) ] ; Purpose Changes a sequence in one of the following ways: changes the increment between future sequence values sets or eliminates the minimum or maximum value Prerequisite The sequence must be in your own schema.

Table 4-1 Arguments Used with the ALTER SEQUENCE Command Usage NotesTo restart a sequence at a different number, you must drop and recreate the sequence. This statement sets a new maximum value for the ESEQ sequence: Related Topics Syntax.