SQL Commands Flashcards

1
Q

What does CREATE TABLE do

A

The CREATE TABLE command can add a new table to an existing database

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

What does ALTER TABLE DO

A

ALTER TABLE is used to add,change, or remove fields on an existing table it also lets you define primary and foreign keys

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

What does DROP TABLE do

A

The DROP TABLE command deleted an entire table including all the data stored in it

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

What does CREATE DATABASE do

A

The CREATE DATABASE command allows you to begin a brand new database

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

what does CREATE VIEW do

A

The CREATE VIEW command creates a virtual table populated from an SQL statement result set

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

What does CREATE INDEX do

A

the CREATE INDEX command creates an index within a table which can be used to accelerate the speed of query retrevial time

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

What does SELECT do

A

The SELECT command let’s you view specific information you want from the database used with *

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

What does WHERE do

A

The WHERE command let’s you narrow your query to only the results you want

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

What does UPDATE AND SET do

A

The UPDATE command makes changes to existing records in a table it’s usually used with the SET command which tells the database which changes to make

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

What does DELETE do

A

The DELETE command deletes record from a table

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

What does the INSERT INTO and VALUES command do

A

These commands work together to add records to an existing table the INSERT INTO command tells the database which table should store the new record VALUES tells the data base what to write

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

What does GRANT do

A

The GRANT command gives a user specific permissions to a specific database object and it part of the data control language within SQL

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

What does REVOKE DO

A

the REVOKE command removes specific permissions to specific database objects and is also part of the data control language within SQL

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