1/29/2014

A List Of Basic SQL Commands And Reference Guide For Accessing Databases

A List Of Basic SQL Commands And Reference Guide For Accessing Databases

For accessing databases, SQL is the standard language and I have compiled a list of it's basic commands below. Tell me what you think by leaving a comment and don't forget to stop by my tutorial page for other great lessons!

The Commands:

Data Definition Language (DDL): (Remember CAD)

Create – used to create objects in the database
Alter – Alter the structure of the database, modify existing object (adding more columns to a table)
Drop – Delete objects from the database (completely erase structure)
Truncate – Remove just the data inserted in a table while keeping the tables structure
Comment – Used to add comments and make notes within your table or information
Rename – Rename the object

Data Manipulation Language (DML): (Remember SUDI)

Select – Retrieve data from the database
Insert – Insert data into a table
Update – Update existing information already in the table
Delete – Removes one or more records from the table (does not free up space)
Merge – (upsert) Insert or update an operation
Call – Distributes application logic and processing
Explain Plan – Determines the execution plan
Query – Asking a question to the database
Lock Table – Prevents modifications to the table within the database

Data Control Language (DCL):

Grant – Used to give privileges
Revoke – Take away privileges

Transaction Control Language (TCL):

Commit – Save the work that has been created
Rollback – Going back to the last save point, or prior commit
Save Point – Point of your last save, where transactions are committed
Set Transaction – Set transaction option

No comments:

Post a Comment


Copyright © justinwoodie.com ©