Sunday, April 1, 2007

20th entry - SQL Syntax

SQL syntax is easy to understand and learn. This is because SQL syntax is in English. Because it is in English, it does not require user to remember much about the command syntax to query for an operation in SQL. Below are some SQL syntax example referring from W3Schools (2007);

SELECT lastName FROM Persons

INSERT INTO table_name (col1, col2, ...)

UPDATE table_name
SET column_name = col_name
WHERE col_name = value

DELETE FROM table_name
WHERE col_name = value

Above the syntax example are the basic command such as SELECT, UPDATE, INSERT, DELETE and many more.

Reference
W3Schools (2007), "SQL Tutorial", http://www.w3schools.com/sql/default.asp

No comments: