SQL Easy Test

SQL Easy Test

10th Grade

20 Qs

quiz-placeholder

Similar activities

Linux-2 Quiz 2 -- LAMP

Linux-2 Quiz 2 -- LAMP

1st - 12th Grade

15 Qs

Excel

Excel

10th - 12th Grade

15 Qs

12AIT - All About W3C <3

12AIT - All About W3C <3

10th Grade - University

18 Qs

Excel-lent Quiz

Excel-lent Quiz

10th Grade

15 Qs

Programming

Programming

10th Grade

15 Qs

History of Package Design

History of Package Design

9th - 12th Grade

20 Qs

ESBWB Workbook Domain 1 Lesson 2

ESBWB Workbook Domain 1 Lesson 2

9th - 12th Grade

15 Qs

Cyber Security KS4

Cyber Security KS4

8th - 12th Grade

15 Qs

SQL Easy Test

SQL Easy Test

Assessment

Quiz

Computers

10th Grade

Practice Problem

Hard

Created by

VIKAS BANDARU

Used 2+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which SQL keyword is used to retrieve data from a table?

GET
FETCH
SELECT
TAKE
READ

Answer explanation

`SELECT` is the standard SQL keyword for retrieving data.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax to rename a column in the result set?

SELECT name RENAME full_name FROM students;
SELECT name AS full_name FROM students;
SELECT name TO full_name FROM students;
SELECT full_name = name FROM students;
SELECT name IS full_name FROM students;

Answer explanation

`AS` is used to provide an alias for a column.

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of the following is correct to delete all rows from the table `orders`?

DELETE ALL FROM orders;
REMOVE * FROM orders;
DELETE FROM orders;
CLEAR TABLE orders;
DROP ALL FROM orders;

Answer explanation

`DELETE FROM table_name;` removes all rows but keeps the table structure.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Identify the syntax error: `SELECT id name FROM employees;`

Missing semicolon
FROM must come before SELECT
Missing comma between column names
AS keyword required
Incorrect table name

Answer explanation

Multiple columns in SELECT must be separated by commas.

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What will this query return? `SELECT UPPER('sql');`

sql
SQL
Sql
'SQL'
Error

Answer explanation

`UPPER()` converts the string to uppercase, returning `SQL`.

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which statement creates a new table named `books` with two columns: id (INT) and title (VARCHAR)?

CREATE TABLE books (id INT, title VARCHAR(100));
CREATE books TABLE (id INTEGER, title STRING(100));
NEW TABLE books (id INT, title VARCHAR(100));
MAKE TABLE books (id INT, title VARCHAR(100));
CREATE TABLE books (id NUMBER, title TEXT(100));

Answer explanation

Correct SQL syntax uses `CREATE TABLE` followed by column definitions.

7.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which SQL keyword is used to sort the result set?

SORT BY
ORDER
ARRANGE BY
ORDER BY
SORT

Answer explanation

`ORDER BY` is the SQL keyword for sorting.

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