WHAT IS an SQL? (Structured Query Language)

SQL is a standard interactive and programming language for getting information from and updating a database.
It is both an ANSI (American National Standards Institute) and an ISO (International Standardization Organization) standard.
Queries in the SQL take the form of a command language that lets the user to select, insert or find out the location of data and so forth.
HOW IT WORKS?
An SQL gives the user a sequence of functions;
Examples of SQL INSERT.
With insert the user can add new row to an existing table, Also new rows can be added to an already existing table. In some cases new rows can contain information from the start or can be with a null value.
INSERT INTO: phone book (Phone number., First name, Last name, address) Values ( +254, 701, 234, 568,’ Eric,’John,’ Kenya)
Example of an SQL UPDATE
The user can easily modify already existing information in an SQL table by a simple Update statement.
Example of SQL DELETE
The user of a device such as a phone can easily delete a contact from a phonebook, First name WHERE TO WHERE ‘Eric,’ AND last name ‘John,’
Example of SQL GRANT
This statement of Grant authorizes or gives the user permission to modify or change the selected table
GRANT: All privileges on Database-Name of Database-User.
Example of SQL REVOKE
The statement above denies the user the previous granted authority or permission to modify the database contents.
REVOKE: All privileges on Database-Name of Database-User.
Example of SQL ALTER
This statement permits the user to change or modify the existing contents into his or her own designed ways e.g. through substitution or addition etc. to already existing table.
ALTER: Table Phone book Replace Selected Contacts.
Example of SQL TRUNCATE
The statement above i.e. truncate gives the user a command to delete all contents in a given table, at the same time keeping the original table intact and ready for further use or reference.
TRUNCATE: Table Phone book.
Example of SQL DROP
With the statement above i.e. drop the user can be able to delete tables which he or she no longer uses.
DROP: Table Phone book.
Example of SQL CREATE
This statement allows the user to create or add a new content to an existing table.
CREATE: Table Phone book (Phone number.) First name (‘Eric,’) Last name (‘John,’) Address (‘247,’)

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s