Creating a basic table involves naming the table and defining its columns and each column’s data type.
The SQL _______ ______ statement is used to create a new table
CREATE TABLE
The SQL _________ command is used to add, delete or modify columns in an existing table.
ALTER TABLE
You would also use ________ command to add and drop various constraints on an existing table.
ALTER TABLE
To change the name of an existing table
ALTER TABLE - ALTER/RENAME TABLE
To change the data type of a column in a table
ALTER TABLE - ALTER/MODIFY COLUMN
is used to remove database objects, such as tables, indexes, or views, from a database.
The DROP command
in SQL is used to retrieve data from one or more tables. It is one of the fundamental and most commonly used statements in SQL
SELECT Statement
Optional. Filter the rows based on a specified condition. It restricts the result set to only include rows that satisfy the condition
Where Clause
Optional. Sorts the result set based on one or more columns. Default is ascending (ASC), but you can specify descending (DESC)
ORDER BY Clause
Used with aggregate functions to group and filter data.
GROUP BY and HAVING CLAUSES
SELECT AVG(salary) FROM employees;
Aggregate Functions (SUM, AVG, MIN, MAX, COUNT): Perform calculations on data