Logo 
Search:

CPP Interview FAQs

Submit Interview FAQ
No Records Found!!!
Go Ahead and Post your Interview FAQ
Home » Interview FAQs » CPPRSS Feeds
SQL
Comments: 0

What will happen if a unique index is created on a nonunique field?

Depending on which database you are using, you will receive some type of error and no index at all will be created. The constituent fields of a unique index must form a unique value.
Posted By:Shruti Sharma      Posted On: Dec 21

SQL
Comments: 0

When using the HAVING clause, do you always have to use a GROUP BY also?

When using the HAVING clause, do you always have to use a GROUP BY also?

Yes.
Posted By:Shruti Sharma      Posted On: Dec 21

SQL
Comments: 0

Can you use ORDER BY on a column that is not one of the columns in the SELECT statement?

Yes, it is not necessary to use the SELECT statement on a column that you put in the ORDER BY clause.
Posted By:Shruti Sharma      Posted On: Dec 21

SQL
Comments: 0

Which clause works just like LIKE(%)?

Which clause works just like LIKE(%)?

STARTING WITH
Posted By:Shruti Sharma      Posted On: Dec 21

SQL
Comments: 0

What is the function of the GROUP BY clause, and what other clause does it act like?

The GROUP BY clause groups data result sets that have been manipulated by various functions. The GROUP BY clause acts like the ORDER BY clause in that it orders the results of the query in the order the columns are listed in the GROUP BY.
Posted By:Shruti Sharma      Posted On: Dec 21

SQL
Comments: 0

Using today's TEAMSTATS table, write a query to determine who is batting under .25

Using today's TEAMSTATS table, write a query to determine who is batting under .25. (For the baseball-challenged reader, batting average is hits/ab.)

INPUT:

SELECT NAME FROM TEAMSTATS
WHERE (HITS/AB) < .25;

OUTPUT:

NAME
-----------...
Posted By:Shruti Sharma      Posted On: Dec 21

SQL
Comments: 0

What will happen if a unique index is created on a nonunique field?

Depending on which database you are using, you will receive some type of error and no index at all will be created. The constituent fields of a unique index must form a unique value.
Posted By:Shruti Sharma      Posted On: Dec 21

SQL
Comments: 0

When using the HAVING clause, do you always have to use a GROUP BY also?

When using the HAVING clause, do you always have to use a GROUP BY also?

Yes.
Posted By:Shruti Sharma      Posted On: Dec 21

SQL
Comments: 0

Can you use ORDER BY on a column that is not one of the columns in the SELECT statement?

Yes, it is not necessary to use the SELECT statement on a column that you put in the ORDER BY clause.
Posted By:Shruti Sharma      Posted On: Dec 21

SQL
Comments: 0

Which clause works just like LIKE(%)?

Which clause works just like LIKE(%)?

STARTING WITH
Posted By:Shruti Sharma      Posted On: Dec 21

SQL
Comments: 0

What is the function of the GROUP BY clause, and what other clause does it act like?

The GROUP BY clause groups data result sets that have been manipulated by various functions. The GROUP BY clause acts like the ORDER BY clause in that it orders the results of the query in the order the columns are listed in the GROUP BY.
Posted By:Shruti Sharma      Posted On: Dec 21

SQL
Comments: 0

Using today's TEAMSTATS table, write a query to determine who is batting under .25

Using today's TEAMSTATS table, write a query to determine who is batting under .25. (For the baseball-challenged reader, batting average is hits/ab.)

INPUT:

SELECT NAME FROM TEAMSTATS
WHERE (HITS/AB) < .25;

OUTPUT:

NAME
-----------...
Posted By:Shruti Sharma      Posted On: Dec 21

  8  9  10  11  12  13  14  15  16  17  18