SQL Basics and Query Fundamentals
Quiz covering fundamental SQL concepts including SELECT statements, subqueries, DML operations, SQL operators, and basic query syntax.
Questions
A Literal is enclosed in double quotes.
- True
- False
SQL is
- Structured Query Language
- Standard Query Language
- System Query Language
- Simple Query Language
Limiting the rows in a select statement for a specific condition is done by the clause
- Distinct
- Projection
- Where
- All of the above
Character values are case insensitive
- True
- False
Arithmetic expressions containing a null value evaluate to null.
- True
- False
Concatenation operator is
- +
- -
- ||
- *
What are SQL “SELECT” statement capabilities.
- Projection
- Selection
- Join
- All of the above
To select all the columns from a table EMP, which one of the following is TRUE?
- Select all columns from EMP;
- Select distinct columns from EMP;
- Select * from EMP;
- All of the above
Select ename from emp where ename =”Scott”; This select statement executes successfully.
- True
- False
A Literal is enclosed in double quotes.
- True
- False
SQL is
- Structured Query Language
- Standard Query Language
- System Query Language
- Simple Query Language
Duplicate values are eliminated by which keyword
- Duplicate
- Distinct
- Remove
- Delete
The two types of subqueries are:
- Single-row subquery, Double-row subquery
- Double-row subquery, Multiple-row subquery
- Multiple-row subquery
- Single-row subquery and Multiple subquery
Single-row subquery returns:
- Only one row
- Two rows
- Zero rows
- There is no such subquery
What is the result of the query below? SELECT Stud_name, Rollnum FROM STUDENT WHERE stud_marks=(SELECT MIN (stud_marks) FROM STUDENT GROUPBY Rollnum);
- It gives the name and marks of all the students.
- It does not return anything.
- It shows an error saying” INVALID SYNTAX ERROR”
- It shows an error saying” Single-row subquery returns more than one row
Which of the following is not a multiple-row operator?
- IN
- OF
- ALL
- ANY
Which operator compares a value to every value returned by a subquery?
- IN
- OF
- ALL
- ANY
A DML statement is executed when you
- Add new rows to a table
- Modify existing rows of a table
- Remove existing rows from a table
- All of the above
The right syntax insert a row into a table is
- Insert to table tablename (….);
- Insert into table tablename (….);
- Insert into table tablename values (…..);
- Any one of the above
Which is the function that records the current date?
- Date
- Sysdate
- Current Date
- System Date