ADVERTISEMENT
ADVERTISEMENT

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



ADVERTISEMENT



ADVERTISEMENT



Comments and Discussions


ADVERTISEMENT

ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT

Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates

© https://www.includehelp.com some rights reserved.