SQL Select – Insert – Update – Delete

SQL SELECT Statement

SQL SELECT DISTINCT Statement

The SELECT keyword allows us to grab all information from a column

(or columns) on a table. This, of course, necessarily means that there will be

redundancies. What if we only want to select each DISTINCT element? This is

easy to accomplish in SQL. All we need to do is to add-DISTINCT after SELECT.

SQL SELECT Syntax

SELECT column_name(s) FROM table_name AND

SELECT* FROM table_name

The SELECT statement is used to select data from a database.

The result is stored in a result table, called the result-set.

SQL INSERT INTO Statement

The INSERT INTO statement is used to insert new records in a table

SQL INSERT Syntax

INSERT INTO TABLE_NAME (column1, column2, column3,…columnN)
VALUES (value1, value2, value3,…valueN);

SQL UPDATE Statement

The UPDATE statement is used to update existing records in a table.

SQL Update Syntax

UPDATE table_name

SET column1=value,
column2=value2,…

WHERE Some -column=some- value

SQL DELETE Statement

The DELETE statement is used to delete records in a table

SQL DELETE Syntax

DELETE FROM name_of_table

with specific record

DELETE FROM name_of_table WHERE conditions_exist

Leave a Reply

Your email address will not be published.