SQL

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/78

encourage image

There's no tags or description

Looks like no tags are added yet.

79 Terms

1
New cards

ADD

Adds a column in an existing table

2
New cards

ADD CONSTRAINT

Adds a constraint after a table is already created

3
New cards

ALL

Returns true if all of the subquery values meet the condition

4
New cards

ALTER

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

5
New cards

ALTER COLUMN

Changes the data type of a column in a table

6
New cards

ALTER TABLE

Adds, deletes, or modifies columns in a table

7
New cards

AND

Only includes rows where both conditions is true

8
New cards

ANY

Returns true if any of the subquery values meet the condition

9
New cards

AS

Renames a column or table with an alias

10
New cards

ASC

Sorts the result set in ascending order

11
New cards

BACKUP DATABASE

Creates a back up of an existing database

12
New cards

BETWEEN

Selects values within a given range

13
New cards

CASE

Creates different outputs based on conditions

14
New cards

CHECK

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

15
New cards

COLUMN

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

16
New cards

CONSTRAINT

Adds or deletes a constraint

17
New cards

CREATE

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

18
New cards

CREATE DATABASE

Creates a new SQL database

19
New cards

CREATE INDEX

Creates an index on a table (allows duplicate values)

20
New cards

CREATE OR REPLACE VIEW

Updates a view

21
New cards

CREATE TABLE

Creates a new table in the database

22
New cards

CREATE PROCEDURE

Creates a stored procedure

23
New cards

CREATE UNIQUE INDEX

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

24
New cards

CREATE VIEW

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

25
New cards

DATABASE

Creates or deletes an SQL database

26
New cards

DEFAULT

A constraint that provides a default value for a column

27
New cards

DELETE

Deletes rows from a table

28
New cards

DESC

Sorts the result set in descending order

29
New cards

DISTINCT

Selects only distinct (different) values

30
New cards

DROP

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

31
New cards

DROP COLUMN

Deletes a column in a table

32
New cards

DROP CONSTRAINT

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

33
New cards

DROP DATABASE

Deletes an existing SQL database

34
New cards

DROP DEFAULT

Deletes a DEFAULT constraint

35
New cards

DROP INDEX

Deletes an index in a table

36
New cards

DROP TABLE

Deletes an existing table in the database

37
New cards

DROP VIEW

Deletes a view

38
New cards

EXEC

Executes a stored procedure

39
New cards

EXISTS

Tests for the existence of any record in a subquery

40
New cards

FOREIGN KEY

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

41
New cards

FROM

Specifies which table to select or delete data from

42
New cards

FULL OUTER JOIN

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

43
New cards

GROUP BY

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

44
New cards

HAVING

Used instead of WHERE with aggregate functions

45
New cards

IN

Allows you to specify multiple values in a WHERE clause

46
New cards

INDEX

Creates or deletes an index in a table

47
New cards

INNER JOIN

Returns rows that have matching values in both tables

48
New cards

INSERT INTO

Inserts new rows in a table

49
New cards

INSERT INTO SELECT

Copies data from one table into another table

50
New cards

IS NULL

Tests for empty values

51
New cards

IS NOT NULL

Tests for non-empty values

52
New cards

JOIN

Joins tables

53
New cards

LEFT JOIN

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

54
New cards

LIKE

Searches for a specified pattern in a column

55
New cards

LIMIT

Specifies the number of records to return in the result set

56
New cards

NOT

Only includes rows where a condition is not true

57
New cards

NOT NULL

A constraint that enforces a column to not accept NULL values

58
New cards

OR

Includes rows where either condition is true

59
New cards

ORDER BY

Sorts the result set in ascending or descending order

60
New cards

OUTER JOIN

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

61
New cards

PRIMARY KEY

A constraint that uniquely identifies each record in a database table

62
New cards

PROCEDURE

A stored procedure

63
New cards

RIGHT JOIN

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

64
New cards

ROWNUM

Specifies the number of records to return in the result set

65
New cards

SELECT

Selects data from a database

66
New cards

SELECT DISTINCT

Selects only distinct (different) values

67
New cards

SELECT INTO

Copies data from one table into a new table

68
New cards

SELECT TOP

Specifies the number of records to return in the result set

69
New cards

SET

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

70
New cards

TABLE

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

71
New cards

TOP

Specifies the number of records to return in the result set

72
New cards

TRUNCATE TABLE

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

73
New cards

UNION

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

74
New cards

UNION ALL

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

75
New cards

UNIQUE

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

76
New cards

UPDATE

Updates existing rows in a table

77
New cards

VALUES

Specifies the values of an INSERT INTO statement

78
New cards

VIEW

Creates, updates, or deletes a view

79
New cards

WHERE

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