Professional Documents
Culture Documents
1. Which SQL function is used to count the number of rows in a SQL query?
a) COUNT()
b) NUMBER()
c) SUM()
d) COUNT(*)
View Answer
Answer: d
Explanation: COUNT(*) takes null value row in to consideration.
Answer: c
Explanation: The MAX() function returns the largest value of the selected column.
3. Which of the following SQL clauses is used to DELETE tuples from a database table?
a) DELETE
b) REMOVE
c) DROP
d) CLEAR
View Answer
Answer: a
Explanation: The SQL DELETE Query is used to delete the existing records from a table.
Driving mobility
READ MORE
sponsored by: Mitsubishi Electric
advertisement
https://www.sanfoundry.com/sqlserver-mcqs-basic-sql-1/ 1/7
1/30/24, 1:21 PM SQL Basics Questions and Answers - Sanfoundry
4. ___________removes all rows from a table without logging the individual row deletions.
a) DELETE
b) REMOVE
c) DROP
d) TRUNCATE
View Answer
Answer: d
Explanation: TRUNCATE statement is a Data Definition Language (DDL) operation that marks the
extents of a table for deallocation.
Answer: a
Explanation: Data definition language (DDL) commands enable you to perform the following
tasks:Create, alter, and drop schema objects.
Answer: d
Explanation: Transaction control commands manage changes made by DML commands. These
SQL commands are used for managing changes affecting the data.
Answer: b
Explanation: SQL commands can be used not only for searching the database but also to perform
various other functions.They are DDL,DML,TCL and DCL.
advertisement
8. 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
View Answer
https://www.sanfoundry.com/sqlserver-mcqs-basic-sql-1/ 3/7
1/30/24, 1:21 PM SQL Basics Questions and Answers - Sanfoundry
Answer: a
Explanation: ASC is the default sort order. Null values are treated as the lowest possible values.
Answer: a
Explanation: The SQL TRUNCATE command is used to delete all the rows from the table and free
the space containing the table.
advertisement
Answer: a
Explanation: SQL Aliases are defined for columns and tables. Basically aliases are created to make
the column selected more readable.
https://www.sanfoundry.com/sqlserver-mcqs-basic-sql-1/ 4/7
1/30/24, 1:21 PM SQL Basics Questions and Answers - Sanfoundry
To practice all areas of SQL Server, here is complete set of 1000+ Multiple Choice Questions and
Answers.
« Prev - SQL Server Questions and Answers – » Next - SQL Server Questions and Answers –
Builtin Functions Basic SQL – 2
Related Posts:
advertisement
Recommended Articles:
1. SQL Server Questions and Answers – Basic SQL – 2
2. SQL Server Questions and Answers – Basic SQL – 3
3. SQL Server Questions and Answers – Partitioning
4. SQL Server Questions and Answers – Modifying Data – 2
5. SQL Server Questions and Answers – Management Studio – 1
6. SQL Server Questions and Answers – Modifying Data – 1
https://www.sanfoundry.com/sqlserver-mcqs-basic-sql-1/ 5/7
1/30/24, 1:21 PM SQL Basics Questions and Answers - Sanfoundry
advertisement
Additional Resources:
SQL Server MCQ Questions
Visual Basic MCQ Questions
C# Programs on LINQ
C Programs on File Handling
Basic Chemical Engineering MCQ Questions
Popular Pages:
C++ Algorithm Library
Basic Civil Engineering MCQ Questions
String Programs in C
Bitwise Operators in C
Basic Electrical Engineering MCQ Questions
https://www.sanfoundry.com/sqlserver-mcqs-basic-sql-1/ 6/7
1/30/24, 1:21 PM SQL Basics Questions and Answers - Sanfoundry
Name
Subscribe
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is
Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on
development of Linux Kernel, SAN Technologies, Advanced C, Data
Structures & Alogrithms. Stay connected with him at LinkedIn.
https://www.sanfoundry.com/sqlserver-mcqs-basic-sql-1/ 7/7