Unit 5 Flashcards

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.

A

ROUND

18
Q

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

A

CEILING

19
Q

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

A

FLOOR

20
Q

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

A

SQRT

21
Q

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

A

ABS

22
Q

(attribute), which returns a number squared.

A

SQUARE

23
Q

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

A

Isnull

24
Q

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

A

NULLIF

25
Q

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.

A

TOP

26
Q

returns a certain percentage of rows that fall at the top of a specified range.

A

PERCENT

27
Q

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.

A

LIMIT

28
Q

specifies the offset of the first row to return. The offset of the first row is 0, not 1.

A

offset

29
Q

specifies maximum number of rows to return.

A

count

30
Q

is a specialized conversion function that always converts from a number (for example, float or numeric) to a character data type

A

STR

31
Q

function is also used to explicitly convert to a given data type. But, the ——- function has additional limited formatting capabilities.

A

CONVERT

32
Q

function returns part of a string

A

SUBSTRING

33
Q

removes blanks from the beginning (left) of a string.

A

LTRIM

34
Q

removes blanks from the end (right) of a string.

A

RTRIM

35
Q

function returns the starting position of a specified pattern.

A

CHARINDEX

36
Q

returns the substring from the given string before a specified number of occurrences of a delimiter.

A

SUBSTRING_INDEX()

37
Q

function returns the starting position of a specified pattern

A

INSTR

38
Q

To produce all the fields in the result set (output) in uppercase or in lowercase

A

UPPER/ LOWER

39
Q

function returns the length (number of characters) of a desired string excluding trailing blanks.

A

LEN