SQL Keywords 101 Flashcards

(160 cards)

1
Q

ADD

A

Adds a column in an existing table

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

ADD CONSTRAINT

A

Adds a constraint after a table is already created

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

ALL

A

Returns true if all of the subquery values meet the condition

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

ALTER

A

Adds, deletes, or modifies columns in a table, or changes the data type of a column in a table

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

ALTER COLUMN

A

Changes the data type of a column in a table

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

ALTER TABLE

A

Adds, deletes, or modifies columns in a table

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

AND

A

Only includes rows where both conditions is true

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

ANY

A

Returns true if any of the subquery values meet the condition

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

AS

A

Renames a column or table with an alias

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

ASC

A

Sorts the result set in ascending order

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

BACKUP DATABASE

A

Creates a back up of an existing database

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

BETWEEN

A

Selects values within a given range

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

CASE

A

Creates different outputs based on conditions

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

CHECK

A

A constraint that limits the value that can be placed in a column

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

COLUMN

A

Changes the data type of a column or deletes a column in a table

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

CONSTRAINT

A

Adds or deletes a constraint

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

CREATE

A

Creates a database, index, view, table, or procedure

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

CREATE DATABASE

A

Creates a new SQL database

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

CREATE INDEX

A

Creates an index on a table (allows duplicate values)

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

CREATE OR REPLACE VIEW

A

Updates a view

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

CREATE TABLE

A

Creates a new table in the database

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

CREATE PROCEDURE

A

Creates a stored procedure

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

CREATE UNIQUE INDEX

A

Creates a unique index on a table (no duplicate values)

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

CREATE VIEW

A

Creates a view based on the result set of a SELECT statement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
DATABASE
Creates or deletes an SQL database
26
DEFAULT
A constraint that provides a default value for a column
27
DELETE
Deletes rows from a table
28
DESC
Sorts the result set in descending order
29
DISTINCT
Selects only distinct (different) values
30
DROP
Deletes a column, constraint, database, index, table, or view
31
DROP COLUMN
Deletes a column in a table
32
DROP CONSTRAINT
Deletes a UNIQUE, PRIMARY KEY, FOREIGN KEY, or CHECK constraint
33
DROP DATABASE
Deletes an existing SQL database
34
DROP DEFAULT
Deletes a DEFAULT constraint
35
DROP INDEX
Deletes an index in a table
36
DROP TABLE
Deletes an existing table in the database
37
DROP VIEW
Deletes a view
38
EXEC
Executes a stored procedure
39
EXISTS
Tests for the existence of any record in a subquery
40
FOREIGN KEY
A constraint that is a key used to link two tables together
41
FROM
Specifies which table to select or delete data from
42
FULL OUTER JOIN
Returns all rows when there is a match in either left table or right table
43
GROUP BY
Groups the result set (used with aggregate functions: COUNT, MAX, MIN, SUM, AVG)
44
HAVING
Used instead of WHERE with aggregate functions
45
IN
Allows you to specify multiple values in a WHERE clause
46
INDEX
Creates or deletes an index in a table
47
INNER JOIN
Returns rows that have matching values in both tables
48
INSERT INTO
Inserts new rows in a table
49
INSERT INTO SELECT
Copies data from one table into another table
50
IS NULL
Tests for empty values
51
IS NOT NULL
Tests for non-empty values
52
JOIN
Joins tables
53
LEFT JOIN
Returns all rows from the left table, and the matching rows from the right table
54
LIKE
Searches for a specified pattern in a column
55
LIMIT
Specifies the number of records to return in the result set
56
NOT
Only includes rows where a condition is not true
57
NOT NULL
A constraint that enforces a column to not accept NULL values
58
OR
Includes rows where either condition is true
59
ORDER BY
Sorts the result set in ascending or descending order
60
OUTER JOIN
Returns all rows when there is a match in either left table or right table
61
PRIMARY KEY
A constraint that uniquely identifies each record in a database table
62
PROCEDURE
A stored procedure
63
RIGHT JOIN
Returns all rows from the right table, and the matching rows from the left table
64
ROWNUM
Specifies the number of records to return in the result set
65
SELECT
Selects data from a database
66
SELECT DISTINCT
Selects only distinct (different) values
67
SELECT INTO
Copies data from one table into a new table
68
SELECT TOP
Specifies the number of records to return in the result set
69
SET
Specifies which columns and values that should be updated in a table
70
TABLE
Creates a table, or adds, deletes, or modifies columns in a table, or deletes a table or data inside a table
71
TOP
Specifies the number of records to return in the result set
72
TRUNCATE TABLE
Deletes the data inside a table, but not the table itself
73
UNION
Combines the result set of two or more SELECT statements (only distinct values)
74
UNION ALL
Combines the result set of two or more SELECT statements (allows duplicate values)
75
UNIQUE
A constraint that ensures that all values in a column are unique
76
UPDATE
Updates existing rows in a table
77
VALUES
Specifies the values of an INSERT INTO statement
78
VIEW
Creates, updates, or deletes a view
79
WHERE
Filters a result set to include only records that fulfill a specified condition
80
Adds a column in an existing table
ADD
81
Adds a constraint after a table is already created
ADD CONSTRAINT
82
Returns true if all of the subquery values meet the condition
ALL
83
Adds, deletes, or modifies columns in a table, or changes the data type of a column in a table
ALTER
84
Changes the data type of a column in a table
ALTER COLUMN
85
Adds, deletes, or modifies columns in a table
ALTER TABLE
86
Only includes rows where both conditions is true
AND
87
Returns true if any of the subquery values meet the condition
ANY
88
Renames a column or table with an alias
AS
89
Sorts the result set in ascending order
ASC
90
Creates a back up of an existing database
BACKUP DATABASE
91
Selects values within a given range
BETWEEN
92
Creates different outputs based on conditions
CASE
93
A constraint that limits the value that can be placed in a column
CHECK
94
Changes the data type of a column or deletes a column in a table
COLUMN
95
Adds or deletes a constraint
CONSTRAINT
96
Creates a database, index, view, table, or procedure
CREATE
97
Creates a new SQL database
CREATE DATABASE
98
Creates an index on a table (allows duplicate values)
CREATE INDEX
99
Updates a view
CREATE OR REPLACE VIEW
100
Creates a new table in the database
CREATE TABLE
101
Creates a stored procedure
CREATE PROCEDURE
102
Creates a unique index on a table (no duplicate values)
CREATE UNIQUE INDEX
103
Creates a view based on the result set of a SELECT statement
CREATE VIEW
104
Creates or deletes an SQL database
DATABASE
105
A constraint that provides a default value for a column
DEFAULT
106
Deletes rows from a table
DELETE
107
Sorts the result set in descending order
DESC
108
Selects only distinct (different) values
DISTINCT
109
Deletes a column, constraint, database, index, table, or view
DROP
110
Deletes a column in a table
DROP COLUMN
111
Deletes a UNIQUE, PRIMARY KEY, FOREIGN KEY, or CHECK constraint
DROP CONSTRAINT
112
Deletes an existing SQL database
DROP DATABASE
113
Deletes a DEFAULT constraint
DROP DEFAULT
114
Deletes an index in a table
DROP INDEX
115
Deletes an existing table in the database
DROP TABLE
116
Deletes a view
DROP VIEW
117
Executes a stored procedure
EXEC
118
Tests for the existence of any record in a subquery
EXISTS
119
A constraint that is a key used to link two tables together
FOREIGN KEY
120
Specifies which table to select or delete data from
FROM
121
Returns all rows when there is a match in either left table or right table
FULL OUTER JOIN
122
Groups the result set (used with aggregate functions: COUNT, MAX, MIN, SUM, AVG)
GROUP BY
123
Used instead of WHERE with aggregate functions
HAVING
124
Allows you to specify multiple values in a WHERE clause
IN
125
Creates or deletes an index in a table
INDEX
126
Returns rows that have matching values in both tables
INNER JOIN
127
Inserts new rows in a table
INSERT INTO
128
Copies data from one table into another table
INSERT INTO SELECT
129
Tests for empty values
IS NULL
130
Tests for non-empty values
IS NOT NULL
131
Joins tables
JOIN
132
Returns all rows from the left table, and the matching rows from the right table
LEFT JOIN
133
Searches for a specified pattern in a column
LIKE
134
Specifies the number of records to return in the result set
LIMIT
135
Only includes rows where a condition is not true
NOT
136
A constraint that enforces a column to not accept NULL values
NOT NULL
137
Includes rows where either condition is true
OR
138
Sorts the result set in ascending or descending order
ORDER BY
139
Returns all rows when there is a match in either left table or right table
OUTER JOIN
140
A constraint that uniquely identifies each record in a database table
PRIMARY KEY
141
A stored procedure
PROCEDURE
142
Returns all rows from the right table, and the matching rows from the left table
RIGHT JOIN
143
Specifies the number of records to return in the result set
ROWNUM
144
Selects data from a database
SELECT
145
Selects only distinct (different) values
SELECT DISTINCT
146
Copies data from one table into a new table
SELECT INTO
147
Specifies the number of records to return in the result set
SELECT TOP
148
Specifies which columns and values that should be updated in a table
SET
149
Creates a table, or adds, deletes, or modifies columns in a table, or deletes a table or data inside a table
TABLE
150
Specifies the number of records to return in the result set
TOP
151
Deletes the data inside a table, but not the table itself
TRUNCATE TABLE
152
Combines the result set of two or more SELECT statements (only distinct values)
UNION
153
Combines the result set of two or more SELECT statements (allows duplicate values)
UNION ALL
154
A constraint that ensures that all values in a column are unique
UNIQUE
155
Updates existing rows in a table
UPDATE
156
Specifies the values of an INSERT INTO statement
VALUES
157
Creates, updates, or deletes a view
VIEW
158
Filters a result set to include only records that fulfill a specified condition
WHERE
159
Describes information about a given table
DESCRIBE
160
DESCRIBE
Describes information about a given table. DESCRIBE table_name;