Member-only story
Fun facts about SQL before your interview
Preparing for a SQL interview? Don’t miss out on these essential facts about SQL.
SQL, or Structured Query Language, is a domain-specific programming language used for managing and manipulating relational databases.
SQL supports various data types such as integer, varchar, date, boolean, float, and many more, each suited for different types of data storage and manipulation.
A primary key uniquely identifies each record in a table and cannot contain NULL values.
Identity columns (also known as auto-increment columns) are columns that automatically generate unique values for each row inserted into a table. They are commonly used as primary keys.
A foreign key establishes a relationship between two tables. It ensures referential integrity by enforcing a link between the data in two tables.
Constraints are rules applied to columns or tables to enforce data integrity. Common constraints include NOT NULL, UNIQUE, PRIMARY KEY, FOREIGN KEY, and CHECK constraints.
SQL JOINS are used to retrieve data from multiple tables. Common types include INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL JOIN.