Functions
1.

Which SQL function is used to count the number of rows in a SQL query?

A.  

COUNT()

B.  

NUMBER()

C.  

SUM()

D.  

COUNT(*)

2.

Which of the following is not a valid aggregate function ?

A.  

COUNT

B.  

COMPUTE

C.  

SUM

D.  

MAX

3.

The SQL statement:

SELECT ROUND (65.726, -1) FROM DUAL;  

A.  

is illegal

B.  

garbage

C.  

726

D.  

70

4.

Evaluate the SQL statement:

SELECT ROUND (TRUNCATE (MOD (1600, 10), -1), 2) FROM dual;  

A.  

0

B.  

1

C.  

00

D.  

An error statement

5.

What is the need for our query to execute successfully on an existing view?

A.  

The specified table must contain data.

B.  

We must have a SELECT privilege on the view.

C.  

We should have a SELECT privilege only on the specified table.

D.  

The specified table must be in the same database or schema.

6.

Which function returns an array of row values?

A.  

fetchrow_array()

B.  

fetchrow_arrayref()

C.  

fetch()

D.  

fetchrow_hashref()

7.

Which function returns a reference to hash of row values?

A.  

fetchrow_array()

B.  

fetchrow_arrayref()

C.  

fetch()

D.  

fetchrow_hashref()

8.

‘fetchrow_hashref()’ returns a reference to the hash of row values keyed by what?

A.  

row name

B.  

column name

C.  

table name

D.  

database name

9.

The maximum non zero value for FLOAT is ______________

A.  

3.402823466E+38

B.  

3.402823466E+37

C.  

3.402823466E+39

D.  

3.402823466E+35

10.

The COUNT function in SQL returns the number of ______________

A.  

Values

B.  

Distinct values

C.  

Group By

D.  

Columns