웹프로그래밍/DB

SQL Commands 3

뚱이의발걸음 2016. 2. 25. 04:50
  • Primary Key is a column that serves a unique identifier for row in the table. Values in this column must be unique and cannot be NULL.
  • Foreign Key is a column that contains the primary key to another table in the database. It is used to identify a particular row in the referenced table.
  • Joins are used in SQL to combine data from multiple tables.
  • INNER JOIN will combine rows from different tables if the join condition is true.
  • LEFT OUTER JOIN will return every row in the left table, and if the join condition is not met, NULL values are used to fill in the columns from theright table.
  • AS is a keyword in SQL that allows you to rename a column or table in the result set using an alias.