|
Technical Sample Questions : C |
C++ |
Oracle |
Java | Unix |
Operating Systems |
Data Structure
Oracle Sample Questions ›› Oracle SQL
Technical Sample Questions
Oracle Sample Questions : Oracle SQL
- What are the most important DDL statements in SQL?
Answer: The most important DDL statements in SQL are:
- create table-creates a new database table
- alter table-alters (changes) a database table
- drop table-deletes a database table
- create index-creates an index (search key)
- drop index-deletes an index
- What are the different SELECT statements?
Answer: The SELECT statements are:
- SELECT column_name(s) FROM table_nameSELECT DISTINCT column_name(s) FROM table_name
- SELECT column FROM table WHERE column operator value
- SELECT column FROM table WHERE column LIKE pattern
- SELECT column,SUM(column) FROM table GROUP BY column
- SELECT column,SUM(column) FROM table GROUP BY column HAVING SUM(column) condition value
- What are the INSERT INTO Statements?
Answer: The INSERT INTO statements are:
- INSERT INTO table_name VALUES (value1, value2,....)
- INSERT INTO table_name (column1, column2,...) VALUES (value1, value2,....)
- Write theUpdate Statement?
Answer:
UPDATE table_name SET column_name = new_value WHERE column_name = some_value
- What are the Delete Statements?
Answer: These are:
- DELETE FROM table_name WHERE column_name = some_value
Delete All Rows:
- DELETE FROM table_name
- DELETE * FROM table_name
- how we can sort the Rows?
Answer: There are mainly three types:
- SELECT column1, column2,...FROM table_name ORDER BY columnX, columnY,..
- SELECT column1, column2,...FROM table_name ORDER BY columnX DESC
- SELECT column1, column2,...FROM table_name ORDER BY columnX DESC, columnY ASC
- Explain IN operator.
Answer:
The IN operator may be used if you know the exact value you want to return for at least one of the columns.
SELECT column_name FROM table_name WHERE column_name IN (value1,value2,..)
- Explain BETWEEN...AND
Answer:
SELECT column_name FROM table_name WHERE column_name BETWEEN value1 AND value2 The values can be numbers, text, or dates.
« Previous
Oracle SQL Sample Question Number:
1-10|
11-20|
21-28
|
|