Disclaimer:
Educational Use Only:
The website links provided are to be used strictly for educational and knowledge-gaining purposes only.
No Misuse:
Do not misuse the links or the information contained therein for any commercial, illegal, or unethical activities.
Respect for Websites and Businesses:
Respect the intellectual property and business interests of the websites and their owners. Do not attempt to alter, copy, or redistribute content without proper authorization.
Acknowledge Value of Knowledge:
Recognize and value the knowledge and resources shared by these websites. Use the information responsibly and ethically.
No Endorsement:
The provision of these links does not imply endorsement of the linked sites, their content, or their products and services. Users are responsible for evaluating the suitability and accuracy of the information.
User Responsibility:
By accessing these links, you agree to use the information at your own risk and to comply with all applicable laws and website terms of use.
Overall MCQs for Reference
- What does SQL stand for?
a. Structured Question Language
b. Structured Query Language
c. Systematic Query Language
d. Sequential Query Language
Answer: bstudocu+1 - Which SQL clause is used to retrieve data from a database?
a. GET
b. SELECT
c. FETCH
d. RETRIEVE
Answer: bsanfoundry+1 - Which statement is used to remove duplicate rows from a SQL query result?
a. UNIQUE
b. DISTINCT
c. DIFFERENT
d. REMOVE
Answer: bplacementpreparation+1 - Which SQL command is used to update existing data in a table?
a. CHANGE
b. ALTER
c. UPDATE
d. MODIFY
Answer: cinterviewbit+1 - In SQL, which function counts the number of rows in a result set?
a. SUM()
b. COUNT()
c. TOTAL()
d. NUMBER()
Answer: bigmguru+1 - Which clause is used to filter the results in SQL?
a. HAVING
b. ORDER BY
c. WHERE
d. LIMIT
Answer: cinterviewbit+1 - What is the default sorting order of the ORDER BY clause?
a. Descending
b. Random
c. Ascending
d. Lexical
Answer: csanfoundry+1 - Which clause would you use to summarize data in SQL?
a. AGGREGATE
b. GROUP BY
c. UNION
d. SUMMARIZE
Answer: bigmguru+1 - Which SQL statement is used to create a new table?
a. ADD TABLE
b. MAKE TABLE
c. CREATE TABLE
d. NEW TABLE
Answer: cstudocu+1 - Which data type is invalid in SQL?
a. INT
b. STRING
c. DATE
d. FLOAT
Answer: bplacementpreparation+1 - Which constraint ensures that values in a column are unique?
a. PRIMARY KEY
b. UNIQUE
c. FOREIGN KEY
d. INDEX
Answer: bsanfoundry+1 - Which operator is used for pattern matching in SQL?
a. FIND
b. LIKE
c. SEARCH
d. MATCH
Answer: bplacementpreparation+1 - What does the SUM function do in SQL?
a. Adds all values in a column
b. Divides values in a column
c. Subtracts values in a column
d. Multiplies values in a column
Answer: aigmguru+1 - What is a primary key?
a. A key used to sort data in a table
b. A key that uniquely identifies a row
c. A key used to create indexes
d. A key used for encryption
Answer: bstudocu+1 - Which keyword sorts the results in descending order?
a. DOWN
b. REVERSE
c. DESC
d. DECR
Answer: csanfoundry+1 - Which operator is used to combine two or more conditions in SQL?
a. OR
b. IF
c. BOTH
d. WITH
Answer: aplacementpreparation+1 - Which clause is used to filter results after grouping?
a. WHERE
b. ORDER BY
c. HAVING
d. GROUP BY
Answer: cigmguru+1 - Which function returns the average value of a numeric column?
a. SUM()
b. MEAN()
c. AVG()
d. AVERAGE()
Answer: cigmguru+1 - Which statement removes all records from a table but keeps the structure?
a. DELETE
b. REMOVE
c. TRUNCATE
d. DROP
Answer: cinterviewbit+1 - Which type of JOIN returns all records when there is a match in either table?
a. INNER JOIN
b. OUTER JOIN
c. LEFT JOIN
d. CROSS JOIN
Answer: bsanfoundry+1 - What does the WHERE clause do in a SELECT query?
a. Sorts the results
b. Filters records based on condition
c. Groups the results
d. Deletes the records
Answer: binterviewbit+1 - Which SQL statement is used to delete data from a database?
a. REMOVE
b. DELETE
c. DROP
d. CLEAR
Answer: binterviewbit+1 - What symbol is used for a single-line comment in SQL?
a. //
b. —
c. #
d. ##
Answer: bplacementpreparation+1 - Which of these keywords is used to combine the result set of two SELECT statements?
a. JOIN
b. MERGE
c. UNION
d. LINK
Answer: csanfoundry+1 - What does the AVG function calculate?
a. Column Maximum
b. Column Minimum
c. Column Mean
d. Column Sum
Answer: cigmguru+1 - Which constraint does not accept NULL values in a column?
a. UNIQUE
b. PRIMARY KEY
c. NOT NULL
d. CHECK
Answer: csanfoundry+1 - What SQL statement is used to extract data from a database?
a. SELECT
b. EXTRACT
c. CHOOSE
d. TAKE
Answer: ainterviewbit+1 - In SQL, which statement is used to modify the structure of an existing table?
a. UPDATE
b. CHANGE
c. ALTER TABLE
d. MODIFY
Answer: ctestbook+1 - How do you select all columns from a table called students?
a. SELECT students FROM *;
b. SELECT FROM students *;
c. SELECT * FROM students;
d. SELECT all FROM students;
Answer: cplacementpreparation+1 - Which SQL keyword is used to remove a table from a database?
a. ERASE
b. CLEAN
c. DROP
d. REMOVE
Answer: cinterviewbit+1 - Which SQL operator is used to test for the absence of a value?
a. IS EMPTY
b. IS VOID
c. IS NULL
d. IS BLANK
Answer: csanfoundry+1 - Which query returns unique values from a column named city in the table customers?
a. SELECT city FROM customers;
b. SELECT DISTINCT city FROM customers;
c. SELECT city UNIQUE FROM customers;
d. UNIQUE SELECT city FROM customers;
Answer: bplacementpreparation+1 - Which SQL command is used to add new rows to a table?
a. INSERT INTO
b. ADD ROW
c. APPEND
d. PUSH
Answer: ainterviewbit+1 - What does the % wildcard represent in SQL?
a. Any single character
b. Any sequence of characters
c. Only digits
d. Only letters
Answer: bsanfoundry+1 - Which clause limits the number of records returned by a query?
a. STOP
b. TOP
c. LIMIT
d. SHORTEN
Answer: cplacementpreparation+1 - Which command is used to change data in an existing table row?
a. ALTER
b. UPDATE
c. INSERT
d. MODIFY
Answer: btestbook+1 - Which type of SQL JOIN returns only matched rows from both tables?
a. FULL JOIN
b. LEFT JOIN
c. RIGHT JOIN
d. INNER JOIN
Answer: dsanfoundry+1 - What does the HAVING clause do?
a. Filters data before grouping
b. Filters groups created by GROUP BY
c. Orders data by a column
d. Sums up column values
Answer: bigmguru+1 - Which SQL statement is used to give a name to a result column?
a. AS
b. LIKE
c. NAME
d. BY
Answer: aplacementpreparation+1 - In machine learning with SQL, which operation is often used as an initial data cleaning step?
a. Removing duplicates
b. Creating indexes
c. Dropping tables
d. Granting permissions
Answer: aplacementpreparation+1 - Which SQL function is used to return the largest value?
a. BIGGEST()
b. MAX()
c. LAST()
d. UPPER()
Answer: bsanfoundry+1 - Which of the following operators is case-insensitive in SQL pattern matching?
a. LIKE
b. IN
c. ANY
d. BETWEEN
Answer: aplacementpreparation+1 - What is the result of the expression 5/2 in SQL if both operands are integers?
a. 2
b. 2.5
c. 3
d. Error
Answer: atestbook+1 - Which of the following can be used to remove all records from a table without removing the table structure?
a. DROP
b. REMOVE
c. DELETE
d. TRUNCATE
Answer: dinterviewbit+1 - What does the SQL IN operator do?
a. Combines records
b. Selects values within a range
c. Tests if a value matches items in a list
d. Checks column names
Answer: csanfoundry+1 - Which type of join returns all records from the left table and matched records from the right?
a. LEFT JOIN
b. RIGHT JOIN
c. INNER JOIN
d. OUTER JOIN
Answer: aplacementpreparation+1 - Which SQL aggregate function ignores NULL values by default?
a. SUM()
b. AVG()
c. COUNT()
d. All of the above
Answer: digmguru+1 - Which command is used to permanently remove a table and its data from a database?
a. DELETE
b. REMOVE
c. DROP
d. ERASE
Answer: cinterviewbit+1 - Which of the following SQL statements retrieves unique department names from a table called employees?
a. SELECT DISTINCT department FROM employees;
b. SELECT department FROM employees;
c. SELECT UNIQUE department employees;
d. SELECT department UNIQUE FROM employees;
Answer: asanfoundry+1 - Which clause is used for filtering aggregate results?
a. GROUP BY
b. HAVING
c. WHERE
d. FILTER
Answer: bigmguru+1
- https://www.studocu.com/in/document/anna-university/machine-learning/mcq-questions-combined/85488180
- https://www.placementpreparation.io/mcq/sql/
- https://www.sanfoundry.com/1000-sql-questions-answers/
- https://www.interviewbit.com/sql-mcq/
- https://www.igmguru.com/blog/sql-mcqs
- https://www.sanfoundry.com/1000-sql-server-questions-answers/
- https://testbook.com/objective-questions/mcq-on-sql–5eea6a0939140f30f369da8c
- https://www.placementpreparation.io/mcq/data-science/
- https://www.w3schools.com/sql/sql_quiz.asp
- https://www.sanfoundry.com/1000-data-science-questions-answers/
- https://interviewkickstart.com/blogs/articles/sql-mcqs-answers
- https://www.scholarhat.com/tutorial/sqlserver/sql-mcq-questions
- https://www.gyansetu.in/blog/machine-learning-mcq-interview-preparation/
- https://www.scribd.com/document/698854678/SQL-MCQ-Multiple-Choice-Questions-Javatpoint
- https://www.placementpreparation.io/mcq/machine-learning/
- https://www.interviewbit.com/data-science-mcq/
- https://www.geeksforgeeks.org/sql/sql-quiz/
- https://www.youtube.com/watch?v=_zMh8BQ3twM
- https://www.geeksforgeeks.org/quizzes/machine-learning-quiz-questions-and-answers/
- https://www.thevistaacademy.com/sql-mcq-for-business-analyst/