Q. Which of the following is not a conversion function?

  • (A) CAST and CONVERT
  • (B) PARSE
  • (C) TRY_CAST
  • (D) TRY_CASE
πŸ’¬ Discuss
βœ… Correct Answer: (D) TRY_CASE

Q. ______________ returns the rank of rows within the partition of a result set, without any gaps in the ranking.

  • (A) RANK
  • (B) NTILE
  • (C) DENSE_RANK
  • (D) ROW_NUMBER
πŸ’¬ Discuss
βœ… Correct Answer: (C) DENSE_RANK

Q. Built in Functions in SQL Server is categorized into how many categories?

  • (A) 4
  • (B) 5
  • (C) 6
  • (D) 7
πŸ’¬ Discuss
βœ… Correct Answer: (A) 4

Q. Which of the following SQL clauses is used to DELETE tuples from a database table?

  • (A) DELETE
  • (B) REMOVE
  • (C) DROP
  • (D) CLEAR
πŸ’¬ Discuss
βœ… Correct Answer: (A) DELETE

Q. With SQL, how can you return the number of not null records in the “Persons” table?

  • (A) SELECT COUNT(*) FROM Persons
  • (B) SELECT COLUMNS(*) FROM Persons
  • (C) SELECT COLUMNS() FROM Persons
  • (D) SELECT COUNT() FROM Persons
πŸ’¬ Discuss
βœ… Correct Answer: (D) SELECT COUNT() FROM Persons

Q. With SQL, how can you return all the records from a table named “Persons” sorted descending by “FirstName”?

  • (A) SELECT * FROM Persons ORDER BY FirstName DESC
  • (B) SELECT * FROM Persons SORT ‘FirstName’ DESC
  • (C) SELECT * FROM Persons ORDER FirstName DESC
  • (D) SELECT * FROM Persons SORT BY ‘FirstName’ DESC
πŸ’¬ Discuss
βœ… Correct Answer: (A) SELECT * FROM Persons ORDER BY FirstName DESC

Q. With SQL, how do you select all the records from a table named “Persons” where the value of the column “FirstName” ends with an “a”?

  • (A) SELECT * FROM Persons WHERE FirstName=’%a%’
  • (B) SELECT * FROM Persons WHERE FirstName LIKE ‘%a’
  • (C) SELECT * FROM Persons WHERE FirstName LIKE ‘a%’
  • (D) SELECT * FROM Persons WHERE FirstName=’a’
πŸ’¬ Discuss
βœ… Correct Answer: (B) SELECT * FROM Persons WHERE FirstName LIKE ‘%a’

Q. What does DML stand for?

  • (A) Data Manipulation language
  • (B) Data Mode Lane
  • (C) Data Model Language
  • (D) Different Mode Level
πŸ’¬ Discuss
βœ… Correct Answer: (A) Data Manipulation language

Q. What is the purpose of the SQL AS clause?

  • (A) The AS SQL clause is used to change the name of a column in the result set or to assign a name to a derived column
  • (B) The AS clause defines a search condition
  • (C) The AS clause is used with the JOIN clause only
  • (D) All of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (A) The AS SQL clause is used to change the name of a column in the result set or to assign a name to a derived column

Q. If you don’t specify ASC or DESC after a SQL ORDER BY clause, the following is used by default ______________

  • (A) ASC
  • (B) DESC
  • (C) There is no default value
  • (D) None of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (A) ASC