Unit 5 Flashcards

(39 cards)

1
Q

function produces a date by adding a specified number to a specified part of a date.

A

DATEADD

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

function returns the difference between two parts of a date.

A

DATEDIFF

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

function subtracts a specified time interval from a date.

A

DATE_SUB()

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

function returns the specified part of the date requested.

A

DATEPART

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

function is used to return a single part of a date/time, such as year, month, day, hour, minute, etc.

A

EXTRACT()

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

function will extract the year from a value stored as a SMALLDATETIME data type.

A

YEAR

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

function will extract the month from a date.

A

MONTH

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

function extracts the day of the month from a date

A

DAY

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

function returns the current system date and time

A

GETDATE

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

function returns the current system date and time in Universal Time Coordinate Format, useful for getting date and time of other location.

A

GETUTCDATE

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

Returns the current date and time

A

NOW()

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

Returns the current date

A

CURDATE()

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

Returns the current time

A

CURTIME()

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

Returns the current utc date

A

UTC_DATE()

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

Returns the current utc time

A

UTC_TIME()

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

operate on values in single rows, one row at a time.

A

Row-level Functions

17
Q

function rounds numbers to a specified number of decimal places.

18
Q

(attribute), which returns the next larger integer value when a number contains decimal places.

19
Q

(attribute), which returns the next lower integer value when a number contains decimal places.

20
Q

(attribute), which returns the square root of positive numeric values.

21
Q

(attribute), which returns the absolute value of any numeric value.

22
Q

(attribute), which returns a number squared.

23
Q

To handle the null issue, SQL Server provides a row-level function, which returns a value if a table value is null.

24
Q

A function, which returns a NULL if expression1 = expression2. If the expressions are not equal, then expression1 is returned.

25
function is used to display or return from a result set the rows that fall at the top of a range specified by an ORDER BY clause.
TOP
26
returns a certain percentage of rows that fall at the top of a specified range.
PERCENT
27
clause is used in the SELECT statement to constrain the number of rows in a result set. The ----- clause accepts one or two arguments. The values of both arguments must be zero or positive integer constants.
LIMIT
28
specifies the offset of the first row to return. The offset of the first row is 0, not 1.
offset
29
specifies maximum number of rows to return.
count
30
is a specialized conversion function that always converts from a number (for example, float or numeric) to a character data type
STR
31
function is also used to explicitly convert to a given data type. But, the ------- function has additional limited formatting capabilities.
CONVERT
32
function returns part of a string
SUBSTRING
33
removes blanks from the beginning (left) of a string.
LTRIM
34
removes blanks from the end (right) of a string.
RTRIM
35
function returns the starting position of a specified pattern.
CHARINDEX
36
returns the substring from the given string before a specified number of occurrences of a delimiter.
SUBSTRING_INDEX()
37
function returns the starting position of a specified pattern
INSTR
38
To produce all the fields in the result set (output) in uppercase or in lowercase
UPPER/ LOWER
39
function returns the length (number of characters) of a desired string excluding trailing blanks.
LEN