Home Subjects Database SQL Basics

Database
SQL Basics

SQL queries, DBMS, normalization, transactions

19 Q 1 Topics Take Mock Test
Advertisement
Difficulty: All Easy Medium Hard 11–19 of 19
Topics in Database
All SQL Basics 57
Q.11 Easy SQL Basics
Which data type in SQL is used to store large text documents or binary data?
A VARCHAR
B TEXT
C BLOB
D CLOB
Correct Answer:  C. BLOB
EXPLANATION

BLOB (Binary Large Object) stores large binary data. CLOB stores large text. TEXT is limited compared to BLOB/CLOB.

Test
Q.12 Easy SQL Basics
In SQL, which clause is used to filter groups based on aggregate function results?
A HAVING
B WHERE
C GROUP BY
D FILTER
Correct Answer:  A. HAVING
EXPLANATION

HAVING clause filters groups created by GROUP BY, while WHERE filters individual rows before grouping.

Test
Q.13 Easy SQL Basics
Which statement is used to modify existing data in a table?
A MODIFY
B CHANGE
C UPDATE
D ALTER
Correct Answer:  C. UPDATE
EXPLANATION

The UPDATE statement is used to modify existing records in a table.

Test
Q.14 Easy SQL Basics
What will be the output of: SELECT COUNT(*) FROM employees;
A The number of columns in the employees table
B The total number of rows in the employees table
C The names of all employees
D An error message
Correct Answer:  B. The total number of rows in the employees table
EXPLANATION

COUNT(*) returns the total number of rows in the specified table, including NULL values.

Test
Q.15 Easy SQL Basics
Which SQL aggregate function returns the total sum of a numeric column?
A TOTAL()
B ADD()
C SUM()
D COUNT()
Correct Answer:  C. SUM()
EXPLANATION

The SUM() function calculates the total sum of all values in a numeric column.

Test
Q.16 Easy SQL Basics
What is the correct syntax for inserting data into a table?
A INSERT INTO table_name VALUES (value1, value2, value3);
B INSERT table_name (value1, value2, value3);
C ADD INTO table_name VALUES (value1, value2, value3);
D INSERT VALUES table_name (value1, value2, value3);
Correct Answer:  A. INSERT INTO table_name VALUES (value1, value2, value3);
EXPLANATION

INSERT INTO is the correct SQL syntax for inserting new records into a table, followed by the table name and VALUES clause.

Test
Q.17 Easy SQL Basics
Which keyword is used to eliminate duplicate rows in SQL results?
A UNIQUE
B DISTINCT
C DIFFERENT
D EXCLUDE
Correct Answer:  B. DISTINCT
EXPLANATION

The DISTINCT keyword removes duplicate rows from the result set of a query.

Test
Q.18 Easy SQL Basics
What does the WHERE clause do in SQL?
A Sorts the results
B Filters rows based on specified conditions
C Groups the data
D Joins multiple tables
Correct Answer:  B. Filters rows based on specified conditions
EXPLANATION

The WHERE clause is used to filter records that meet specified conditions in a SQL query.

Test
Q.19 Easy SQL Basics
Which SQL command is used to retrieve data from a database?
A SELECT
B RETRIEVE
C GET
D FETCH
Correct Answer:  A. SELECT
EXPLANATION

SELECT is the standard SQL command used to retrieve or query data from one or more tables in a database.

Test
IGET
IGET AI
Online · Exam prep assistant
Hi! 👋 I'm your iget AI assistant.

Ask me anything about exam prep, MCQ solutions, study tips, or strategies! 🎯
UPSC strategy SSC CGL syllabus Improve aptitude NEET Biology tips