An Overview of SQL

From InterBase
Jump to: navigation, search

SQL statements fall into two major categories: Data definition language (DDL) statements, and Data manipulation language (DML) statements.

  • DDL statements define, change, and delete the structures that hold data. These include the database itself, tables, and other elements that are part of the database such as domains, indexes, triggers, stored procedures, roles, and shadows. Collectively, the objects defined with DDL statements are known as metadata. DDL statements begin with the keywords CREATE, ALTER, and DROP. For example, CREATE TABLE defines a table, ALTER TABLE modifies an existing table, and DROP TABLE deletes a table.
  • DML statements manipulate data within these data structures. The four fundamental DML statements are INSERT, UPDATE, DELETE, and SELECT. INSERT adds data to a table, UPDATE modifies existing data, and DELETE removes data. The SELECT statement retrieves or queries information from the database. It is the most important, and most complex, of all the SQL statements, because it is the means by which you gain access to all the information that you have so meticulously stored.

In this part of the Quick Start, you will use several DDL statements—CREATE DOMAIN, CREATE TABLE, ALTER TABLE, CREATE VIEW, and CREATE INDEX—to create data structures for your TUTORIAL database.

Advance To:

Using IBConsole to Execute SQL