SQL Tutorials | 02. Syntax Flashcards
Most of the actions you need to perform on a database are done with what?
SQL statements
What do SQL statements consists of?
Keywords that are easy to understand
T/F | SQL keywords are case sensitive
FALSE
SQL keywords are NOT case sensitive: select is the same as SELECT
T/F | Some database systems require a semicolon at the end of each SQL statement.
TRUE
What is a semicolon used for in SQL statements?
Semicolon is the standard way to separate each SQL statement in database systems that allow more than one SQL statement to be executed in the same call to the server.
What are 11 important SQL Commands?
- SELECT - extracts data from a database
- UPDATE - updates data in a database
- DELETE - deletes data from a database
- INSERT INTO - inserts new data into a database
- CREATE DATABASE - creates a new database
- ALTER DATABASE - modifies a database
- CREATE TABLE - creates a new table
- ALTER TABLE - modifies a table
- DROP TABLE - deletes a table
- CREATE INDEX - creates an index (search key)
- DROP INDEX - deletes an index
What does the SQL Command SELECT do?
SELECT - extracts data from a database
What does the SQL Command UPDATE do?
UPDATE - updates data in a database
What does the SQL Command DELETE do?
DELETE - deletes data from a database
What does the SQL Command INSERT INTO do?
INSERT INTO - inserts new data into a database
What does the SQL Command CREATE DATABASE do?
CREATE DATABASE - creates a new database
What does the SQL Command ALTER DATABASE do?
ALTER DATABASE - modifies a database
What does the SQL Command CREATE TABLE do?
CREATE TABLE - creates a new table
What does the SQL Command ALTER TABLE do?
ALTER TABLE - modifies a table
What does the SQL Command DROP TABLE do?
DROP TABLE - deletes a table