What does SQL stand for?
Structured Query Language
What type of language is SQL?
Declarative language
What are the four main commands in SQL?
What is the purpose of the SELECT command in SQL?
Used for retrieving data from a database table
What is the general form of the SELECT command?
SELECT <attribute> FROM <table> WHERE <condition> ORDER BY <ASC/DESC></condition></attribute>
Is the ORDER BY clause mandatory in a SELECT command?
No, it is optional
What is the purpose of the UPDATE command?
Used for modifying the attributes of an existing entity
What is the general form of the UPDATE command?
UPDATE <table> SET <attribute> = <value> WHERE <attribute> = <value></value></attribute></value></attribute>
What is the purpose of the DELETE command?
Used for removing entities from a database
What is the general form of the DELETE command?
DELETE FROM <table> WHERE <condition></condition>
What is the purpose of the INSERT command?
Used to add new records to an existing table
What is the general form of the INSERT command?
INSERT INTO <table> (<column1>, <column2>, …) VALUES (<value1>, <value2>, …)</value2></value1></column2></column1>
How can the INSERT command be simplified?
INSERT INTO <table> VALUES (<value1>, <value2>, …) when all columns are used in correct order</value2></value1>
What are wildcards in SQL?
Used to specify any possible value
How are wildcards typically notated in SQL?
With an asterisk (*)
What command is used to create a new database table in SQL?
CREATE command
What does the CREATE command specify?
What does the CREATE command do?
Creates an empty table
What is the CHAR data type in SQL?
A fixed-length string with a specified number of characters
What is the VARCHAR data type in SQL?
A variable-length string with a maximum specified number of characters
What is the INT data type in SQL?
An integer stored using a specified number of bits
What does the FLOAT data type represent?
A number with a fractional part stored with specified bits and precision
What format is the DATE data type in SQL?
YYYY-MM-DD
What is the format of the DATETIME data type in SQL?
YYYY-MM-DD HH:MM:SS