1/15
Flashcards for SQL Fundamentals
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
Query
A specific request for data manipulation issued by the end-user or the application to the DBMS.
SQL
Stands for Structured Query Language; consists of commands that create database and table structures, perform data manipulation, and query the database.
CREATE DATABASE
SQL command used to create a new database. Syntax: CREATE DATABASE database_name;
DROP DATABASE
SQL command used to delete an existing database. Syntax: DROP DATABASE database_name;
CREATE TABLE
SQL command used to create a new table in a database. Syntax: CREATE TABLE table_name (column1 datatype, …);
DROP TABLE
SQL command used to delete an existing table. Syntax: DROP TABLE table_name;
TRUNCATE TABLE
SQL command used to delete only the data within a table. Syntax: TRUNCATE TABLE table_name;
ALTER TABLE
SQL command used to add, delete, or modify columns in an existing table.
NOT NULL constraint
Ensures that a column cannot have a NULL value.
UNIQUE constraint
Ensures that all values in a column are different.
PRIMARY KEY constraint
Uniquely identifies each row in a table.
FOREIGN KEY constraint
Uniquely identifies a row in another table, establishing a link between two tables.
CHECK constraint
Ensures that all values in a column satisfy a specific condition.
DEFAULT constraint
Sets a default value for a column when no value is specified during insertion.
SQL Data Types
Categories include: Exact numeric, Approximate numeric, Date and time, Character strings, Unicode character strings, Binary strings, and other data types.
SQL Operators
Categories include: Arithmetic, Comparison, Compound, and Logical operators.