SQL Query Syntaxes Aptitude Questions and Answers | Set 3

List of SQL Query Syntaxes Aptitude Questions and Answers

11) What is the correct syntax to display column name ALIAS?
  1. SELECT column_name AS ALIAS alias_name
  2. SELECT column_name AS ALIAS alias_name FROM table_name
  3. SELECT column_name AS alias_name FROM table_name
  4. SELECT column_name AS (alias_name) FROM table_name

12) Which is the correct syntax to get only different values using DISTINCT?
  1. SELECT DISTINCT (column1, column2, ...) FROM table_name
  2. SELECT DISTINCT column1 AND column2 AND ... FROM table_name
  3. SELECT column1, column2, ... FROM DISTINCT table_name
  4. SELECT DISTINCT column1, column2, ... FROM table_name

13) Which is the correct syntax for DROP TABLE statement?
  1. DROP * FROM table_name
  2. DROP TABLE table_name
  3. DROP table_name
  4. DROP TABLE table_name FROM database_name

14) Which is the correct syntax for DROP DATABASE statement?
  1. DROP database_name
  2. DROP database_name DATABASE
  3. DROP DATABASE * database_name
  4. DROP DATABASE database_name

15) What is the correct syntax for CREATE INDEX statement?
  1. CREATE INDEX index_name ON table_name(*)
  2. CREATE index_name ON table_name(column1, column2, ...)
  3. CREATE INDEX index_name ON table_name(column1, column2, ...)
  4. CREATE INDEX ON table_name(*)





Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.