SQL Tutorials | 02. Syntax Flashcards

1
Q

Most of the actions you need to perform on a database are done with what?

A

SQL statements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What do SQL statements consists of?

A

Keywords that are easy to understand

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

T/F | SQL keywords are case sensitive

A

FALSE

SQL keywords are NOT case sensitive: select is the same as SELECT

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

T/F | Some database systems require a semicolon at the end of each SQL statement.

A

TRUE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a semicolon used for in SQL statements?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are 11 important SQL Commands?

A
  1. SELECT - extracts data from a database
  2. UPDATE - updates data in a database
  3. DELETE - deletes data from a database
  4. INSERT INTO - inserts new data into a database
  5. CREATE DATABASE - creates a new database
  6. ALTER DATABASE - modifies a database
  7. CREATE TABLE - creates a new table
  8. ALTER TABLE - modifies a table
  9. DROP TABLE - deletes a table
  10. CREATE INDEX - creates an index (search key)
  11. DROP INDEX - deletes an index
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does the SQL Command SELECT do?

A

SELECT - extracts data from a database

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What does the SQL Command UPDATE do?

A

UPDATE - updates data in a database

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does the SQL Command DELETE do?

A

DELETE - deletes data from a database

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What does the SQL Command INSERT INTO do?

A

INSERT INTO - inserts new data into a database

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What does the SQL Command CREATE DATABASE do?

A

CREATE DATABASE - creates a new database

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does the SQL Command ALTER DATABASE do?

A

ALTER DATABASE - modifies a database

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What does the SQL Command CREATE TABLE do?

A

CREATE TABLE - creates a new table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What does the SQL Command ALTER TABLE do?

A

ALTER TABLE - modifies a table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What does the SQL Command DROP TABLE do?

A

DROP TABLE - deletes a table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What does the SQL Command CREATE INDEX do?

A

CREATE INDEX - creates an index (search key)

17
Q

What does the SQL Command DROP INDEX do?

A

DROP INDEX - deletes an index