SQL Commands (BASIC) Flashcards

1
Q

Creates a database schema

A

CREATE SCHEMA AUTHORIZATION

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

Creates a new table in the user’s database schema

A

CREATE TABLE

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

Ensures that a column will not have null values

A

NOT NULL

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

Ensures that a column will not have duplicate values

A

UNIQUE

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

Defines a primary key for a table

A

PRIMARY KEY

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

Defines a foreign key for a table

A

FOREIGN KEY

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

Defines a default value for a column (when no value is given)

A

DEFAULT

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

Validates data in an attribute

A

CHECK

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

Creates an index for a table

A

CREATE INDEX

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

Creates a dynamic subset of rows and columns from one or more tables (see Lesson 4, Advanced SQL)

A

CREATE VIEW

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

Modifies a table’s definition (adds, modifies, or deletes attributes or constraints)

A

ALTER TABLE

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

Creates a new table based on a query in the user’s database schema

A

CREATE TABLE AS

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

Creates a new table based on a query in the user’s database schema

A

CREATE TABLE AS

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

Permanently deletes a table (and its data)

A

DROP TABLE

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

Permanently deletes an index

A

DROP INDEX

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

Permanently deletes a view

A

DROP VIEW