Microsoft SQL Server Database Quiz Questions

Chapter Name:Chapter 7 - DQL (Data Query Language)
Lesson Content Link:NUMERIC functions
Current Quiz Count:45
Progress
0%
Q1
True / False

The CEILING function always rounds a number up to the nearest integer.

Q2
True / False

The FLOOR function rounds a number down to the nearest integer.

Q3
True / False

The ROUND function can be used to round a number to a specified number of decimal places.

Q4
True / False

The POWER function is used to calculate the square root of a number.

Q5
True / False

The LOG function can be used to calculate the natural logarithm of a number.

Q6
True / False

The ABS function returns the absolute value of a number.

Q7
True / False

The SIGN function returns the sign of a number.

Q8
True / False

The PI function returns the value of pi (π).

Q9
True / False

The SQRT function can be used to calculate the square root of a negative number.

Q10
True / False

The COS function returns the cosine of a given angle in radians.

Q11
True / False

The SIN function returns the sine of a given angle in degrees.

Q12
True / False

The TAN function returns the tangent of a given angle in radians.

Q13
True / False

The DEGREES function converts an angle from degrees to radians.

Q14
True / False

The RADIANS function converts an angle from degrees to radians.

Q15
True / False

The EXP function calculates the exponential value of a number.

Q16
Single Choice

Which function rounds a number up to the nearest integer?

SQL Code
SELECT CEILING(123.456);
SELECT FLOOR(123.456);
SELECT ROUND(123.456, 0);
SELECT CEILING(-789.123);
Q17
Single Choice

Which function rounds a number down to the nearest integer?

SQL Code
SELECT CEILING(123.456);
SELECT FLOOR(123.456);
SELECT ROUND(123.456, 0);
SELECT FLOOR(-789.123);
Q18
Single Choice

Which function can be used to calculate the natural logarithm of a number?

SQL Code
SELECT LOG(2.718);
SELECT LOG(10);
SELECT LN(2.718);
SELECT LOG(5, 2);
Q19
Single Choice

Which function returns the absolute value of a number?

SQL Code
SELECT ABS(-123.456);
SELECT CEILING(-123.456);
SELECT FLOOR(-123.456);
SELECT SIGN(-123.456);
Q20
Single Choice

Which function returns the sign of a number?

SQL Code
SELECT ABS(-123.456);
SELECT CEILING(-123.456);
SELECT FLOOR(-123.456);
SELECT SIGN(-123.456);
Q21
Single Choice

Which function returns the value of pi (π)?

SQL Code
SELECT PI();
SELECT EXP(1);
SELECT LOG(1);
SELECT SQRT(PI());
Q22
Single Choice

Which function calculates the square root of a number?

SQL Code
SELECT SQRT(16);
SELECT EXP(2);
SELECT LOG(16);
SELECT PI();
Q23
Single Choice

Which function calculates the cosine of a given angle?

SQL Code
SELECT COS(PI());
SELECT SIN(PI());
SELECT TAN(PI());
SELECT DEGREES(PI());
Q24
Single Choice

Which function converts an angle from degrees to radians?

SQL Code
SELECT RADIANS(180);
SELECT DEGREES(PI());
SELECT SIN(90);
SELECT COS(180);
Q25
Single Choice

Which function converts an angle from radians to degrees?

SQL Code
SELECT DEGREES(PI());
SELECT RADIANS(180);
SELECT SIN(PI());
SELECT COS(PI());
Q26
Single Choice

Which function calculates the exponential value of a number?

SQL Code
SELECT EXP(1);
SELECT LOG(1);
SELECT PI();
SELECT SQRT(1);
Q27
Single Choice

Which function returns the tangent of a given angle?

SQL Code
SELECT TAN(PI()/4);
SELECT SIN(PI()/4);
SELECT COS(PI()/4);
SELECT DEGREES(PI()/4);
Q28
Single Choice

Which function returns the logarithm of a number to a specified base?

SQL Code
SELECT LOG(10);
SELECT EXP(1);
SELECT PI();
SELECT SQRT(10);
Q29
Single Choice

Which function calculates the trigonometric sine of a given angle?

SQL Code
SELECT SIN(PI()/2);
SELECT COS(PI()/2);
SELECT TAN(PI()/2);
SELECT DEGREES(PI()/2);
Q30
Single Choice

Which function calculates the trigonometric cosine of a given angle?

SQL Code
SELECT COS(PI());
SELECT SIN(PI());
SELECT TAN(PI());
SELECT DEGREES(PI());
Q31
Multiple Choice

Which functions can be used to round numeric values? Select all that apply.

SQL Code
SELECT ROUND(123.456, 1);
SELECT CEILING(456.789);
SELECT FLOOR(789.123);
SELECT ROUND(987.654, 2);
Q32
Multiple Choice

Which functions can be used to compute logarithmic values? Select all that apply.

SQL Code
SELECT LOG(10);
SELECT LN(10);
SELECT LOG(10, 2);
SELECT EXP(1);
Q33
Multiple Choice

Which functions return trigonometric values? Select all that apply.

SQL Code
SELECT SIN(PI()/2);
SELECT COS(PI()/2);
SELECT TAN(PI()/2);
SELECT RADIANS(45);
Q34
Multiple Choice

Which functions can be used to convert between radians and degrees? Select all that apply.

SQL Code
SELECT DEGREES(PI()/2);
SELECT RADIANS(90);
SELECT SIN(PI()/2);
SELECT COS(PI()/2);
Q35
Multiple Choice

Which functions return the absolute value of a number? Select all that apply.

SQL Code
SELECT ABS(-123);
SELECT CEILING(-123);
SELECT FLOOR(-123);
SELECT SIGN(-123);
Q36
Multiple Choice

Which functions are used to perform calculations involving powers? Select all that apply.

SQL Code
SELECT POWER(2, 3);
SELECT EXP(2);
SELECT LOG(10);
SELECT SQRT(16);
Q37
Multiple Choice

Which functions can be used to calculate trigonometric values? Select all that apply.

SQL Code
SELECT TAN(PI()/4);
SELECT COS(PI()/4);
SELECT SIN(PI()/4);
SELECT DEGREES(PI()/4);
Q38
Multiple Choice

Which functions are used to handle angles in SQL Server? Select all that apply.

SQL Code
SELECT DEGREES(PI());
SELECT RADIANS(180);
SELECT SIN(PI());
SELECT COS(PI());
Q39
Multiple Choice

Which functions are used to perform rounding operations? Select all that apply.

SQL Code
SELECT ROUND(123.456, 1);
SELECT CEILING(456.789);
SELECT FLOOR(789.123);
SELECT ROUND(987.654, 2);
Q40
Multiple Choice

Which functions can be used to compute trigonometric functions? Select all that apply.

SQL Code
SELECT SIN(PI()/2);
SELECT COS(PI()/2);
SELECT TAN(PI()/2);
SELECT EXP(1);
Q41
Multiple Choice

Which functions handle mathematical constants? Select all that apply.

SQL Code
SELECT PI();
SELECT EXP(1);
SELECT SQRT(1);
SELECT LOG(10);
Q42
Multiple Choice

Which functions are used to calculate square roots? Select all that apply.

SQL Code
SELECT SQRT(4);
SELECT POWER(2, 2);
SELECT LOG(10);
SELECT EXP(1);
Q43
Multiple Choice

Which functions are used for logarithmic calculations? Select all that apply.

SQL Code
SELECT LOG(10);
SELECT LN(10);
SELECT EXP(1);
SELECT PI();
Q44
Multiple Choice

Which functions perform rounding operations? Select all that apply.

SQL Code
SELECT ROUND(10.25, 1);
SELECT CEILING(10.25);
SELECT FLOOR(10.25);
SELECT TRUNCATE(10.25);
Q45
Multiple Choice

Which functions are used to handle angles in trigonometric calculations? Select all that apply.

SQL Code
SELECT DEGREES(PI()/2);
SELECT RADIANS(90);
SELECT SIN(PI()/2);
SELECT COS(PI()/2);