SQL table interview questions:
1. What is a DUAL table and why do we need it?
- it is a special table which gets created automatically when we install Oracle database. It can be used to select pseudo columns, perform calculations and also as sequence generator etc.
2. How many columns and rows are present in DUAL table?
- one column & one row by default.
3. Can we insert more rows in to DUAL table?
- Yes.
4. What's the easiest way to backup a table / how can we create a table based on existing table?
- CREATE TABLE SALES_COPY AS SELECT * FROM SALES.
5. Can we drop all the columns from a table?
- No.
6. What is the difference between count(1) and count(*)?
- Both are same. Both consume same amount of resources, Both perform same operation
Post #1715
1.23K
- ❤ 1