SQL Query Syntaxes Aptitude Questions and Answers.

SQL Query Syntaxes Aptitude Questions and Answers - This section contains Aptitude Questions and Answers on SQL Query Syntaxes.

List of SQL Query Syntaxes Aptitude Questions and Answers

1) Which is the correct SELECT statement to display all records with all columns of a table?
  1. SELECT * FROM table_name
  2. SELECT ALL COLS FROM table_name
  3. SELECT FROM table_name
  4. None of these

2) Which is the correct SELECT statement to display all records with selected columns of a table?
  1. SELECT * FROM table_name
  2. SELECT column1,column2,... FROM table_name
  3. SELECT FROM table_name
  4. None of these

3) Which is the correct SELECT statement to display selected records (based on the condition) with all columns of a table?
  1. SELECT column1,column2,... FROM table_name
     WHERE condition
  2. SELECT FROM table_name
     WHERE condition
  3. SELECT ALL FROM table_name
     WHERE condition
  4. SELECT * FROM table_name
     WHERE condition

4) Which is the correct syntax for BETWEEN operator?
  1. WHERE column_name BETWEEN (value1 AND value2)
  2. WHERE column_name BETWEEN value1 AND value2
  3. WHERE column_name BETWEEN (value1, value2)
  4. WHERE BETWEEN column_name value1 AND value2