Basic SQL Syntax & Statement with Example
Retrieving Data from Database:
The SQL statement that retrieves data from the database is called SELECT.
Basic Syntax: SELECT field1, field2, fieldn FROM table_name;
example:
select name, email, phone from friends;
Adding Data to the Database:
Basic Syntax:
INSERT INTO table_name (filed1, field2, filedn)
VALUES (‘filed1-value’, ‘field2-value’, ‘fieldn-value’);
Example:
INSERT INTO OFFICES (name, phone, email)
VALUES (‘trivuz’, ‘01010101′, ‘mailid@gmail.com);
Delete Data from Database:
Basic Syntax:
DELETE FROM table_name WHERE field = ‘value’; (condition)
Example:
DELETE FROM friends WHERE name=’trivuz’;
Updating Data:
Basic Syntax:
UPDATE table_name
SET field = ‘value’
WHERE field = ‘value’; (condition)
Example:
UPDATE friends
SET email = ‘info@trivuz.com’
WHERE name = ‘trivuz’;





and in the body section on the page, you will see Hello World written. In the next blogs I will show more tags that will come in handy for you to give your page a better look.