|Q:||What is SQL?|
|A:||SQL stands for ‘Structured Query Language’.|
|Q:||What is SELECT statement?|
|A:||The SELECT statement lets you select a set of values from a table in a database. The values selected from the database table would depend on the various conditions that are specified in the SQL query.|
|Q:||How can you compare a part of the name rather than the entire name?|
|A:||SELECT * FROM people WHERE empname LIKE ‘%ab%’
Would return a recordset with records consisting empname the sequence ‘ab‘ in empname .
|Q:||What is the INSERT statement?|
|A:||The INSERT statement lets you insert information into a database.|
|Q:||How do you delete a record from a database?|
|A:||Use the DELETE statement to remove records or any particular column values from a database.|
|Q:||How can I find the total number of records in a table?|
|A:||You could use the COUNT keyword , example
SELECT COUNT(*) FROM emp WHERE age>40
|Q:||What are the Large object types suported by Oracle?|
|A:||Blob and Clob.|
|Q:||Difference between a “where” clause and a “having” clause.|
|A:||Having clause is used only with group functions whereas Where is not used with.|
|Q:||What are triggers? How to invoke a trigger on demand?|
|A:||Triggers are special kind of stored procedures that get executed automatically when an INSERT, UPDATE or DELETE operation takes place on a table.
Triggers can’t be invoked on demand. They get triggered only when an associated action (INSERT, UPDATE, DELETE) happens on the table on which they are defined.
Triggers are generally used to implement business rules, auditing. Triggers can also be used to extend the referential integrity checks, but wherever possible, use constraints for this purpose, instead of triggers, as constraints are much faster.
|Q:||What is a self join?|
|A:||Self join is just like any other join, except that two instances of the same table will be joined in the query.|