Tag: databases

Questions Related to databases

What is the output of the the query: select 'Sql' from dual where null is null;

  1. No rows will be displayed

  2. Sql

  3. It throws Error

  4. None


Correct Option: B

The below query can be used to get distinct sal from emp table: select unique sal from emp;

  1. True

  2. False


Correct Option: A

Output of the query if emp table is having 100 rows: select rownum from emp group by rownum having rownum = 69;

  1. Error

  2. 69

  3. 1

  4. None


Correct Option: B

If emp table is having 10 rows, which of the below queries executes successfully without error? A) delete from emp; B) delete emp; C) delete emp where 1=1;

  1. A

  2. B

  3. C

  4. None


Correct Option: A,B,C

If emp table having 10 records what is the output of : select * from emp where rownum=8;

  1. It throws error

  2. it will give 8th row

  3. no rows will get displayed

  4. None


Correct Option: C

Select the option to find the size of the database in sql server

  1. sp_databases

  2. sp_spaceused

  3. db_dbm_space_file

  4. None of the above


Correct Option: A,B,C,D