Chapter 6: Fundamentals of SQL 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

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 consrtraints)

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

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
14
Q

permanently deletes an index

A

drop index

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

permanently deletes a view

A

drop view

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

insert row(s) into a table

A

insert

17
Q

selects attributes from rows in one or more tables or views

A

select

18
Q

restricts the selection of rows based on a conditional expression

A

where

19
Q

groups the selected rows based on one or more attributes

A

group by

20
Q

restricts the selection of grouped rows based on a condition

A

having

21
Q

orders the selected rows based on one or more attributes

A

order by

22
Q

modifies an attribute’s value in one or more table’s rows

A

update

23
Q

deletes one or more rows from a table

A

delete

24
Q

permanently saves data changes

A

commit

25
Q

restores data to its original values

A

rollback

26
Q

checks whether an attribute value is within a range

A

between

27
Q

checks whether an attribute value is null

A

is null

28
Q

checks whether an attribute value matches a given string pattern

A

like

29
Q

checks whether a subquery returns any rows

A

exists

30
Q

limits values to unique values

A

distinct

31
Q

returns the number of rows with non=null values for a given column

A

count

32
Q

returns the minimum attribute value found in a given column

A

MIN

33
Q

returns the maximum attribute value found in a given column

A

max

34
Q

returns the sum of all values for a given column

A

sum

35
Q

returns the average of all values for a given column

A

avg

36
Q

an alternate name given to a column or table in any SQL statement

A

alias