A table is an organized collection of data stored in the form of rows and columns. Columns can be categorized as vertical and rows as horizontal. The columns in a table are called fields while the rows can be referred to as records
A UNIQUE constraint ensures that all values in a column are different. This provides uniqueness for the column(s) and helps identify each row uniquely. Unlike the primary key, there can be multiple unique constraints defined per table.
If a table is dropped, all things associated with the tables are dropped as well. However, if a table is truncated, none of the above problems exist and the table retains its original structure.
The DISTINCT statement is used with the SELECT statement. If a record contains duplicate values then DISTINCT will select different values among duplicate records.
SELECT DISTINCT column_name
DELETE removes some or all rows from a table based on the condition.
TRUNCATE removes ALL rows from a table by deallocating the memory pages.
DROP command removes a table from the database completely.
MINUS – returns all distinct rows selected by the first query but not by the second.
UNION – returns all distinct rows selected by either query
UNION ALL – returns all rows selected by either query, including all duplicates.