Major SQL Statements

by Vickram H 2012-07-31 10:29:59

Data Manipulation:

SELECT Retrieves data from the database
INSERT Adds new rows of data to the database
DELETE Removes rows of data from the database
UPDATE Modifies existing database data

Data Definition:

CREATE TABLE Adds a new table to the database
DROP TABLE Removes a table from the database
ALTER TABLE Changes the structure of an existing table
CREATE VIEW Adds a new view to the database
DROP VIEW Removes a view from the database
CREATE INDEX Builds an index for a column
DROP INDEX Removes the index for a column
CREATE SCHEMA Adds a new schema to the database
DROP SCHEMA Removes a schema from the database
CREATE DOMAIN Adds a new data value domain

ALTER DOMAIN Changes a domain definition
DROP DOMAIN Removes a domain from the database


Access Control:


GRANT Grants user access privileges
REVOKE Removes user access privileges

Transaction Control:


COMMIT Ends the current transaction
ROLLBACK Aborts the current transaction
SET
TRANSACTION
Defines data access characteristics of the current transaction

Programmatic SQL:

DECLARE Defines a cursor for a query
EXPLAIN Describes the data access plan for a query
OPEN Opens a cursor to retrieve query results
FETCH Retrieves a row of query results
CLOSE Closes a cursor
PREPARE Prepares a SQL statement for dynamic execution
EXECUTE Executes a SQL statement dynamically
DESCRIBE Describes a prepared query

Tagged in:

768
like
0
dislike
0
mail
flag

You must LOGIN to add comments