Logo 
Search:

sql Interview FAQs

Submit Interview FAQ
Home » Interview FAQs » sqlRSS Feeds
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

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 nesting transactions, does issuing a ROLLBACK TRANSACTION command cancel the current trans

When nesting transactions, does issuing a ROLLBACK TRANSACTION command cancel the current transaction and roll back the batch of statements into the upper-level transaction? Why or why not?


No. When nesting transactions, any rollback of a trans...
Posted By:Shruti Sharma      Posted On: Dec 21

SQL
Comments: 0

Can savepoints be used to "save off" portions of a transaction? Why or why not?

Can savepoints be used to "save off" portions of a transaction? Why or why not?

Yes. Savepoints allow the programmer to save off statements within a transaction. If desired, the transaction can then be rolled back to this savepoint instead of to t...
Posted By:Shruti Sharma      Posted On: Dec 21

SQL
Comments: 0

Can a COMMIT command be used by itself or must it be embedded?

A COMMIT command can be issued by itself or in the transaction.
Posted By:Shruti Sharma      Posted On: Dec 21

SQL
Comments: 0

If you issue the COMMIT command and then discover a mistake, can you still use the ROLLBACK com

If you issue the COMMIT command and then discover a mistake, can you still use the ROLLBACK command?

Yes and No. You can issue the command, but it will not roll back the changes.
Posted By:Shruti Sharma      Posted On: Dec 21

  1  2  3  4  5  6  7  8