google Analytics

Sunday, August 15, 2010

Oracle SQL Query FAQ

1 What is SQL and where does it come from?
2 What are the difference between DDL, DML and DCL commands?
3 Difference between TRUNCATE, DELETE and DROP commands?
4 How does one escape special characters when writing SQL queries?
5 Can one select a random collection of rows from a table?
6 How does one eliminate duplicates rows from a table?
7 How does one get the time difference between two date columns?
8 How does one add a day/hour/minute/second to a date value?
9 How does one code a matrix/crosstab/pivot report in SQL?
10 Can one retrieve only rows X to Y from a table?
11 Can one retrieve only the Nth row from a table?
12 How can one dump/ examine the exact content of a database column?
13 How does one add a column to the middle of a table?
14 How does one code a hierarchical tree-structured query?
15 How does one count/sum data values in a column?
16 How does one drop/ rename a column in a table?
17 How does one implement IF-THEN-ELSE logic in a SELECT statement?
18 How does one prevent Oracle from using an Index?
19 How does one select EVERY Nth row from a table?
20 How does one select the LAST N rows from a table?
21 How does one select the TOP N rows from a table?
22 How to generate a text graphs (histograms) using SQL?
23 Map/ concatenate several rows to a column
24 What is the difference between VARCHAR, VARCHAR2 and CHAR data types?

http://www.orafaq.com/wiki/SQL_FAQ

No comments:

Post a Comment