Unit2 Flashcards

1
Q

SQL requires the use of the ______ command to enter data into a table.

A

Insert

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

Thus far, you have entered rows in which all of the attribute values are specified. But what do you do if a column does not have any available data? In those cases, you would want to leave the column with a valuer of null.

A

Inserting Rows with Null Attributes

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

There might be occasions when more than one attribute is optional. Rather than declaring each attribute as NULL in the INSERT command, you can indicate just the attributes that have required values. You do that by listing the attribute names inside parentheses after the table name.

A

Inserting Rows with Optional Attributes

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

The ______ command is used to list the contents of a table.

A

Select statements

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

list all attributes. A wildcard character is a symbol that can be used as a general substitute for other characters or commands.

A

*

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

Use the _____ command to modify data in a table.

A

Update statements

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

It is easy to delete a table row using the _____;

A

Delete statements

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

To add multiple rows to a table, using another table as the source of the data.

A

Inserting Rows from another table

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

Selecting Rows with Conditional Restrictions

A

Select Queries

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

SQL accepts any valid expressions (or formulas) in the computed columns. Such formulas can contain any valid mathematical operators and functions that are applied to attributes in any of the tables specified in the FROM clause of the SELECT statement.

A

Computed Columns

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

An alias is an alternative name given to a column or table in any SQL statement

A

Aliases

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

is a function that returns the current system date in sql server

A

getdate()

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

is a TSQL function that add a particular date interval from a given column or value. Its accepts the following parameters

A

dateadd()

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

is a function that returns the current system date in mysql

A

curdate()

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

is a MySQL function that subtracts a particular date interval from a given column or value. Its accepts the following parameters

A

date_sub

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

if both conditions are true

A

AND

17
Q

if at least one of the condition is true

A

OR

18
Q

if we want to negate the result of a conditional expression.

A

NOT

19
Q

standard SQL allows the use of special operators in conjunction with the WHERE clause.

A

ANSI

20
Q

Used to check whether an attribute value is within a range

A

BETWEEN

21
Q

Used to check whether an attribute value is null

A

IS NULL

22
Q

Used to check whether an attribute value matches a given string pattern

A

LIKE

23
Q

Used to check whether an attribute value matches any value within a value list

A

IN

24
Q

Used to check whether a subquery returns any rows

A

EXISTS

25
Q

________ may be used to check whether an attribute value is within a range of values

A

BETWEEN

26
Q

——- to check for a null attribute value

A

IS NULL

27
Q

The _____ special operator is used in conjunction with wildcards to find patterns within string attributes.

A

LIKE

28
Q

means any and all following or preceding characters are eligible

A

%

29
Q

means any single character may be substituted for the underscore.

A

_

30
Q

means any single character within a range or a set.

A

[]

31
Q

means any single character NOT within a range or a set.

A

[^]

32
Q

means any single character within a range or a set.

A

REGEXP []

33
Q

means any single character NOT within a range or a set

A

REGEXP [^]

34
Q

Many queries that would require the use of the logical OR can be more easily handled with the help of the special operator IN.

A

IN

35
Q

The _____ special operator can be used whenever there is a requirement to execute a command based on the result of another query.

A

EXISTS