Search Header Logo

SQL_T3

Authored by Riddhish Thakore

Computers

University

Used 5+ times

SQL_T3
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

41 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of the following statements contains an error?

Select * from emp where empid = 10003;
Select empid from emp where empid = 10006;
Select empid from emp;
Select empid where empid = 1009 and lastname = ‘GELLER’;

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which logical operator in PostgreSQL negates a condition and returns true if the condition is false?

AND
OR
NOT
JOIN

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What does the pattern 'j%' in the expression FirstName LIKE 'j%' represent?

Records whose FirstName starts with 'j'
Records whose FirstName contains 'j' or 'J' at any position
Records whose FirstName ends with 'j' or 'J'
Records whose FirstName is not 'j' or 'J'

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

If you don’t specify ASC or DESC after a SQL ORDER BY clause, the following is used by default

ASC
DESC
There is no default value
None of the mentioned

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

The ORDER BY clause in PostgreSQL is used to:

Filter rows based on specific conditions.
Group rows based on one or more columns.
Sort the result set based on one or more columns.
Specify the order of columns in the result set.

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

With SQL, how can you return all the records from a table named “Persons” sorted descending by “FirstName”?

SELECT * FROM Persons SORT BY ‘FirstName’ DESC;
SELECT * FROM Persons ORDER FirstName DESC;
SELECT * FROM Persons SORT ‘FirstName’ DESC;
SELECT * FROM Persons ORDER BY FirstName DESC;

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the significance of “ORDER BY” in the following PostgreSQL statement? SELECT emp_id, fname, lname FROM person ORDER BY emp_id;

Data of emp_id will be sorted in ascending order
Data of emp_id will be sorted in descending order
Data will not be sorted
None of these

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?

Discover more resources for Computers