SQL Query Syntaxes Aptitude Questions and Answers | Set 2

List of SQL Query Syntaxes Aptitude Questions and Answers

6) Which is the correct syntax for LIKE operator?
  1. WHERE column_name IS LIKE pattern_string
  2. WHERE column_name IS LIKE ='pattern_string'
  3. WHERE column_name LIKE pattern_string
  4. WHERE column_name LIKE 'pattern_string'

7) Which is the correct syntax for SELECT statement with TOP keyword to return TOP N records with all columns?
  1. SELECT * FROM TOP n table_name
  2. SELECT TOP n * FROM table_name
  3. SELECT * FROM table_name TOP n
  4. None of these


9) Which is the correct syntax to sort returned record set in Ascending Order by Column1 and Descending Order by Column2?
  1. SELECT * FROM table_name
     ORDER BY ASC (column1), DESC (column2)
  2. SELECT * FROM table_name
     ORDER BY ASC column1, DESC column2
  3. SELECT * FROM table_name
     ORDER BY column1 ASC, column2 DESC
  4. SELECT * FROM table_name
     column1 ASC, column2 DESC ORDER BY

10) Which is the correct syntax for INSERT INTO statement without specifying column names?
  1. INSERT INTO table_name
     VALUES( value1, value2, ...)
  2. INSERT INTO VALUES( value1, value2, ...)
     table_name
  3. INSERT INTO
     VALUES( value1, value2, ...) IN table_name
  4. INSERT * INTO table_name
     VALUES( value1, value2, ...)





Comments and Discussions!

Load comments ↻





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