SQL Commands

There are many SQL Commands that are available to store, retrieve, delete and manipulate the data.

Following are most common that are used.

  • SELECT – Selecting records from a one or more tables.
  • SELECT DISTINCT – Selecting only the distinct/unique records from one or more tables
  • Conditional Commands – Commands that are used to get the records based on a certain condition.
    • WHERE - Select based on a condition
    • BETWEEN – Select based on a range
    • IN – Select based on one or more discrete values
    • LIKE – Select based on a pattern
  • Aggregate Functions – Commands that provide aggregation options
    • COUNT – count number of records
    • SUM - Sum one or more columns
    • MIN – Minimum value of a column
    • MAX – Maximum value of a column
    • AVE - Average value of a column
  • GROUP BYThis Command used with the Aggregate Functions to group the result set by one or more columns.
  • ORDER BYSort the results in a sprcific order (Ascending/Descending).
  • HAVING – This clause used for adding conditions for the Aggregate Functions.
  • String Functions – Common String Functions
  • Date Functions – Useful DATE manipulation functions.
  • JOIN – Retrieve results from multiple table using Join.
  • CONSTRAINTS – Constraints are used to check/limit the data that is loaded to a table.
  • ALIAS – Alias used for renaming a resulting column or a result set from a SQL.
527 views

Return to top