SQL

Structured query language


SQL or Structured query language is a declarative language. This language is used for updating and querying tables.

SELECT FROM WHERE

The SELECT statement is used to get a collection of fields from a table.

  • SELECT list the fields to be shown
  • FROM state what table or tables that the data will be fetched from
  • WHERE state the search
  • ORDER BY if you want to have an ordering on the elements you can state that there

Example

Table: Accounts

Account_NumberFirst_NameLast_Name
348576JaredWilliams
833397BillWilliams
723594JohnDoe
To pull all people with last name Willams you would run the SQL command
SELECT * FROM Accounts WHERE Last_Name = "Williams"

The return would be:

Account_NumberFirst_NameLast_Name
348576JaredWilliams
833397BillWilliams