You are on page 1of 4

[ SHORT INFORMATION]

SAYAN CHOWDHURY
BASIC SQL COMMANDS (JOINS EXCLUDED) ~

1. SELECT: The SELECT statement is used to select data from a


database.

2. SELECT DISTINCT: The SELECT DISTINCT statement is used to


return only distinct (different) values.

3. WHERE: The WHERE clause is used to filter records.

4. AND/OR/NOT: The WHERE clause can be combined with AND, OR,


and NOT operators.

5. ORDER BY: The ORDER BY keyword is used to sort the result-set in


ascending or descending order. The ORDER BY keyword sorts the
records in ascending order by default.

6. INSERT INTO: The INSERT INTO statement is used to insert new


records in a table.

7. UPDATE: The UPDATE statement is used to modify the existing


records in a table.

8. DELETE: The DELETE statement is used to delete existing records in a


table.

SAYAN CHOWDHURY
9. SELECT TOP: T The SELECT TOP clause is used to specify the
number of records to return. The SELECT TOP clause is useful on large
tables with thousands of records. Returning a large number of records
can impact performance.

10. MIN & MAX: The MIN () function returns the smallest value of
the selected column. The MAX () function returns the largest value of
the selected column.

11. COUNT: The COUNT () function returns the number of rows that
matches a specified criterion.

12. AVG: The AVG () function returns the average value of a numeric
column.

13. SUM: The SUM () function returns the total sum of a numeric
column.

14. BETWEEN: The BETWEEN operator selects values within a given


range. The values can be numbers, text, or dates.

15. GROUP BY: The GROUP BY statement groups rows that have
the same values into summary rows, like "find the number of customers
in each country".

SAYAN CHOWDHURY
SAYAN
CHOWDHURY

FOR MORE

RESOURCES USED FROM: W3SCHOOLS.COM

SAYAN CHOWDHURY

You might also like