Tag: programming languages

Questions Related to programming languages

  1. CONVERT

  2. TRANSLATE

  3. DECODE

  4. Both B. and C.


Correct Option: D
  1. select empno, empname, salary from emp order by empname, salary desc;

  2. select empno from emp sort by empname, sal in desc;

  3. select empno, empname, salary from emp sort in empname, salary desc;

  4. select # from emp sort by empname and salary in desc;


Correct Option: A
  1. GENERATE SEQUENCE SE START WITH 30 ADD BY 20;

  2. CREATE SEQUENCE SE START WITH 30 ADD BY 20;

  3. CREATE SEQUENCE SE START WITH 30 INCREMENT BY 20;

  4. GENERATE SEQUENCE SE INITIATE WITH 30 INCREMENT BY 20;


Correct Option: C
  1. Table name can be an oracle reserved word

  2. Table names must begin with a letter

  3. Table names can contain in it numbers also

  4. None of the Above


Correct Option: A
  1. Views are windows of existing table

  2. Creation of view is done by using CREATE VIEW statement

  3. Views do not contain data but table from which it is created contain data

  4. All the Above


Correct Option: D
  1. Non- procedural language

  2. Procedural language

  3. Database Language

  4. Both A. and C.


Correct Option: D

Which of the following is TRUE about subqueries in SQL?

  1. Sub queries must be enclosed in parenthesis

  2. BETWEEN cannot be used with a sub query

  3. Both A. and B.

  4. None of the Above


Correct Option: C

AI Explanation

To answer this question, let's go through each option to understand why it is correct or incorrect:

Option A) Sub queries must be enclosed in parenthesis - This option is correct. In SQL, sub queries are enclosed in parenthesis to separate them from the main query. This helps in defining the scope of the sub query and makes it clear to the database engine where the sub query begins and ends.

Option B) BETWEEN cannot be used with a sub query - This option is incorrect. In SQL, the BETWEEN operator can be used with a sub query. The sub query can provide the range of values for the BETWEEN operator to compare against.

Option C) Both A. and B. - This option is incorrect. Option A is correct, but option B is incorrect.

Option D) None of the Above - This option is incorrect. Option A is correct, so the correct answer cannot be "None of the Above".

Therefore, the correct answer is Option C. This option is correct because sub queries in SQL must be enclosed in parenthesis, but the BETWEEN operator can be used with a sub query.

  1. Structured database Language

  2. Structured programming Language

  3. Structured Query Analyzer

  4. Structured Query Language


Correct Option: D