SQL

  • A computer language designed for managing data in a relational database system

Areas of Data Handling

  • Definition (DDL)

  • Manipulation (DML)

  • Control (DCL)

SQL Query Examples

# Choose the data 
SELECT * FROM Orders;

SELECT OrderID, FirstName, LastName From Orders;

# WHERE for conditional statements 
SELECT OrderID, FirstName, LastName FROM Orders WHERE LastName = 'Walker';

# UNION command lets you join SELECT queries 
SELECT fname, lname FROM users WHERE id=$id UNION ALL SELECT socialsecuritynumber, 1 FROM secretstuff;

Last updated