SQL Keywords 101 Flashcards

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
Q

DATABASE

A

Creates or deletes an SQL database

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

DEFAULT

A

A constraint that provides a default value for a column

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

DELETE

A

Deletes rows from a table

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

DESC

A

Sorts the result set in descending order

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

DISTINCT

A

Selects only distinct (different) values

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

DROP

A

Deletes a column, constraint, database, index, table, or view

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

DROP COLUMN

A

Deletes a column in a table

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

DROP CONSTRAINT

A

Deletes a UNIQUE, PRIMARY KEY, FOREIGN KEY, or CHECK constraint

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

DROP DATABASE

A

Deletes an existing SQL database

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

DROP DEFAULT

A

Deletes a DEFAULT constraint

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

DROP INDEX

A

Deletes an index in a table

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

DROP TABLE

A

Deletes an existing table in the database

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

DROP VIEW

A

Deletes a view

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

EXEC

A

Executes a stored procedure

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

EXISTS

A

Tests for the existence of any record in a subquery

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

FOREIGN KEY

A

A constraint that is a key used to link two tables together

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

FROM

A

Specifies which table to select or delete data from

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

FULL OUTER JOIN

A

Returns all rows when there is a match in either left table or right table

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

GROUP BY

A

Groups the result set (used with aggregate functions: COUNT, MAX, MIN, SUM, AVG)

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

HAVING

A

Used instead of WHERE with aggregate functions

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

IN

A

Allows you to specify multiple values in a WHERE clause

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

INDEX

A

Creates or deletes an index in a table

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

INNER JOIN

A

Returns rows that have matching values in both tables

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

INSERT INTO

A

Inserts new rows in a table

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

INSERT INTO SELECT

A

Copies data from one table into another table

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

IS NULL

A

Tests for empty values

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

IS NOT NULL

A

Tests for non-empty values

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

JOIN

A

Joins tables

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

LEFT JOIN

A

Returns all rows from the left table, and the matching rows from the right table

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

LIKE

A

Searches for a specified pattern in a column

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

LIMIT

A

Specifies the number of records to return in the result set

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

NOT

A

Only includes rows where a condition is not true

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

NOT NULL

A

A constraint that enforces a column to not accept NULL values

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

OR

A

Includes rows where either condition is true

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

ORDER BY

A

Sorts the result set in ascending or descending order

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

OUTER JOIN

A

Returns all rows when there is a match in either left table or right table

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

PRIMARY KEY

A

A constraint that uniquely identifies each record in a database table

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

PROCEDURE

A

A stored procedure

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

RIGHT JOIN

A

Returns all rows from the right table, and the matching rows from the left table

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

ROWNUM

A

Specifies the number of records to return in the result set

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

SELECT

A

Selects data from a database

66
Q

SELECT DISTINCT

A

Selects only distinct (different) values

67
Q

SELECT INTO

A

Copies data from one table into a new table

68
Q

SELECT TOP

A

Specifies the number of records to return in the result set

69
Q

SET

A

Specifies which columns and values that should be updated in a table

70
Q

TABLE

A

Creates a table, or adds, deletes, or modifies columns in a table, or deletes a table or data inside a table

71
Q

TOP

A

Specifies the number of records to return in the result set

72
Q

TRUNCATE TABLE

A

Deletes the data inside a table, but not the table itself

73
Q

UNION

A

Combines the result set of two or more SELECT statements (only distinct values)

74
Q

UNION ALL

A

Combines the result set of two or more SELECT statements (allows duplicate values)

75
Q

UNIQUE

A

A constraint that ensures that all values in a column are unique

76
Q

UPDATE

A

Updates existing rows in a table

77
Q

VALUES

A

Specifies the values of an INSERT INTO statement

78
Q

VIEW

A

Creates, updates, or deletes a view

79
Q

WHERE

A

Filters a result set to include only records that fulfill a specified condition

80
Q

Adds a column in an existing table

A

ADD

81
Q

Adds a constraint after a table is already created

A

ADD CONSTRAINT

82
Q

Returns true if all of the subquery values meet the condition

A

ALL

83
Q

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

A

ALTER

84
Q

Changes the data type of a column in a table

A

ALTER COLUMN

85
Q

Adds, deletes, or modifies columns in a table

A

ALTER TABLE

86
Q

Only includes rows where both conditions is true

A

AND

87
Q

Returns true if any of the subquery values meet the condition

A

ANY

88
Q

Renames a column or table with an alias

A

AS

89
Q

Sorts the result set in ascending order

A

ASC

90
Q

Creates a back up of an existing database

A

BACKUP DATABASE

91
Q

Selects values within a given range

A

BETWEEN

92
Q

Creates different outputs based on conditions

A

CASE

93
Q

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

A

CHECK

94
Q

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

A

COLUMN

95
Q

Adds or deletes a constraint

A

CONSTRAINT

96
Q

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

A

CREATE

97
Q

Creates a new SQL database

A

CREATE DATABASE

98
Q

Creates an index on a table (allows duplicate values)

A

CREATE INDEX

99
Q

Updates a view

A

CREATE OR REPLACE VIEW

100
Q

Creates a new table in the database

A

CREATE TABLE

101
Q

Creates a stored procedure

A

CREATE PROCEDURE

102
Q

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

A

CREATE UNIQUE INDEX

103
Q

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

A

CREATE VIEW

104
Q

Creates or deletes an SQL database

A

DATABASE

105
Q

A constraint that provides a default value for a column

A

DEFAULT

106
Q

Deletes rows from a table

A

DELETE

107
Q

Sorts the result set in descending order

A

DESC

108
Q

Selects only distinct (different) values

A

DISTINCT

109
Q

Deletes a column, constraint, database, index, table, or view

A

DROP

110
Q

Deletes a column in a table

A

DROP COLUMN

111
Q

Deletes a UNIQUE, PRIMARY KEY, FOREIGN KEY, or CHECK constraint

A

DROP CONSTRAINT

112
Q

Deletes an existing SQL database

A

DROP DATABASE

113
Q

Deletes a DEFAULT constraint

A

DROP DEFAULT

114
Q

Deletes an index in a table

A

DROP INDEX

115
Q

Deletes an existing table in the database

A

DROP TABLE

116
Q

Deletes a view

A

DROP VIEW

117
Q

Executes a stored procedure

A

EXEC

118
Q

Tests for the existence of any record in a subquery

A

EXISTS

119
Q

A constraint that is a key used to link two tables together

A

FOREIGN KEY

120
Q

Specifies which table to select or delete data from

A

FROM

121
Q

Returns all rows when there is a match in either left table or right table

A

FULL OUTER JOIN

122
Q

Groups the result set (used with aggregate functions: COUNT, MAX, MIN, SUM, AVG)

A

GROUP BY

123
Q

Used instead of WHERE with aggregate functions

A

HAVING

124
Q

Allows you to specify multiple values in a WHERE clause

A

IN

125
Q

Creates or deletes an index in a table

A

INDEX

126
Q

Returns rows that have matching values in both tables

A

INNER JOIN

127
Q

Inserts new rows in a table

A

INSERT INTO

128
Q

Copies data from one table into another table

A

INSERT INTO SELECT

129
Q

Tests for empty values

A

IS NULL

130
Q

Tests for non-empty values

A

IS NOT NULL

131
Q

Joins tables

A

JOIN

132
Q

Returns all rows from the left table, and the matching rows from the right table

A

LEFT JOIN

133
Q

Searches for a specified pattern in a column

A

LIKE

134
Q

Specifies the number of records to return in the result set

A

LIMIT

135
Q

Only includes rows where a condition is not true

A

NOT

136
Q

A constraint that enforces a column to not accept NULL values

A

NOT NULL

137
Q

Includes rows where either condition is true

A

OR

138
Q

Sorts the result set in ascending or descending order

A

ORDER BY

139
Q

Returns all rows when there is a match in either left table or right table

A

OUTER JOIN

140
Q

A constraint that uniquely identifies each record in a database table

A

PRIMARY KEY

141
Q

A stored procedure

A

PROCEDURE

142
Q

Returns all rows from the right table, and the matching rows from the left table

A

RIGHT JOIN

143
Q

Specifies the number of records to return in the result set

A

ROWNUM

144
Q

Selects data from a database

A

SELECT

145
Q

Selects only distinct (different) values

A

SELECT DISTINCT

146
Q

Copies data from one table into a new table

A

SELECT INTO

147
Q

Specifies the number of records to return in the result set

A

SELECT TOP

148
Q

Specifies which columns and values that should be updated in a table

A

SET

149
Q

Creates a table, or adds, deletes, or modifies columns in a table, or deletes a table or data inside a table

A

TABLE

150
Q

Specifies the number of records to return in the result set

A

TOP

151
Q

Deletes the data inside a table, but not the table itself

A

TRUNCATE TABLE

152
Q

Combines the result set of two or more SELECT statements (only distinct values)

A

UNION

153
Q

Combines the result set of two or more SELECT statements (allows duplicate values)

A

UNION ALL

154
Q

A constraint that ensures that all values in a column are unique

A

UNIQUE

155
Q

Updates existing rows in a table

A

UPDATE

156
Q

Specifies the values of an INSERT INTO statement

A

VALUES

157
Q

Creates, updates, or deletes a view

A

VIEW

158
Q

Filters a result set to include only records that fulfill a specified condition

A

WHERE

159
Q

Describes information about a given table

A

DESCRIBE

160
Q

DESCRIBE

A

Describes information about a given table.

DESCRIBE table_name;