SQL Functions Aptitude Questions and Answers | Set 2

List of SQL Functions - Aggregate and Scalar Aptitude Questions

6) Which SQL command is used to get total number of records of a table?
  1. SELECT (*) FROM table_name
  2. SELECT COUNT FROM table_name
  3. SELECT COUNT(*) FROM table_name
  4. None of these

7) Which command is used to get total number of Unique cities from employee table?
  1. SELECT COUNT(*) FROM employee
  2. SELECT COUNT(UNIQUE cities) FROM employee
  3. SELECT DISTINCT COUNT(cities) FROM employee
  4. SELECT COUNT(DISTINCT cities) FROM employee

8) Which command is correct command to get first city name from cities column in employee table?
  1. SELECT FIRST(cities) FROM employee
  2. SELECT FIRST cities FROM employee
  3. SELECT (cities) FIRST FROM employee
  4. SELECT cities FROM employee

9) Which command is correct to find sum of all values of particular column?
  1. SELECT SUM column_name FROM table_name
  2. SELECT SUM(column_name) FROM TABLE table_name
  3. SELECT FROM table_name SUM(column_name)
  4. SELECT SUM(column_name) FROM table_name

10) Which command is correct to print column values in upper case?
  1. SELECT UCASE(column_name) FROM table_name
  2. SELECT UCASE column_name FROM table_name
  3. SELECT UCASE(column_name) FROM TABLE table_name
  4. SELECT UCASE column_name FROM TABLE table_name





Comments and Discussions!

Load comments ↻





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