---
title: "5 Challenging SQL Questions for Testing Your Skills"
description: "Here are top interview questions associated to SQL tables"
url: https://srinimf.com/2021/09/03/sql-table-5-top-interview-questions/
date: 2021-09-03
modified: 2023-10-19
author: "Srini"
image: https://i0.wp.com/srinimf.com/wp-content/uploads/2021/09/pexels-photo-8730787.jpeg?fit=1880%2C1255&ssl=1
categories: ["SQL"]
tags: ["SQL Tables"]
type: post
lang: en
---

# 5 Challenging SQL Questions for Testing Your Skills

Interview questions can sometimes be tricky. Here is a list of five SQL queries.

## **SQL Tricky Questions **

**Q.1)If the following command is executed: CREATE DATABASE test What is the page size (in
kilobytes) of the database?**

A. 4
B. 8
C. 16
D. 32
**Answer: A**

- [How to Modify Table Data, 4 Helpful SQL Queries](https://srinimf.com/2021/08/14/here-are-4-sql-queries-useful-to-alter-table-data/)

**Q.2)Given the following DDL statement: CREATE TABLE sales (item CHAR(20)); If a DBA
wishes to increase the size of the ITEM column, which SQL statement needs to be used?**

A. ALTER TABLE sales ADD COLUMN item CHAR(40);
B. ALTER TABLE sales ALTER COLUMN item CHAR(40);
C. ALTER TABLE sales MODIFY COLUMN item CHAR(40);
D. ALTER TABLE sales ALTER COLUMN item SET DATA TYPE CHAR(40);
**Answer: D**

**Q.3)Which DB2 object can be used to improve the execution performance of qualified SELECT statements?**

A. Trigger
B. SQL Procedure
C. Sequence Object
D. Materialized Query Table
**Answer: D**

**Q.4)When is it appropriate to use a sequence?**

A. When you want to control the order in which triggers are fired.
B. When you want to control the order in which stored procedures can be invoked.
C. When you want to automatically generate a numeric value that is not tied to any specific
column or table.
D. When you want to automatically generate a numeric value for each row that is added to
a specific table.
**Answer: C**

- [SQL Queries: 3 Ways to Get data When DATES Involved](https://srinimf.com/2021/08/03/3-top-sql-queries-to-calculate-date-duration-easily/)

**Q.5)Which clause should be included in a ALTER TABLE statement to update a table definition with a new column?**

A. ADD COLUMN
B. ALTER COLUMN
C. APPEND COLUMN
D. RENAME COLUMN
**Answer: A**

Related Posts

- [SQL Table Indexes: How to Decide Optimum Number](https://srinimf.com/2020/10/11/sql-more-indexes-are-bad-tricky-interview-question/)DateOctober 11, 2020
- [SQL NULL: Tricky Interview Question](https://srinimf.com/2015/11/11/sql-query-to-describe-null-value-best-example/)DateNovember 11, 2015
- [How to Alter Table: Top SQL Queries](https://srinimf.com/2018/10/25/sql-alter-statement-top-examples-useful-to-write-any-complex-query/)DateOctober 25, 2018

### Share this:

-
- [Tweet](https://twitter.com/share)
- [![](https://i0.wp.com/assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png)](https://www.pinterest.com/pin/create/link/?url=https%3A%2F%2Fsrinimf.com%2F2021%2F09%2F03%2Fsql-table-5-top-interview-questions%2F&media=https%3A%2F%2Fi0.wp.com%2Fsrinimf.com%2Fwp-content%2Fuploads%2F2021%2F09%2Fpexels-photo-8730787.jpeg%3Ffit%3D1200%252C801%26ssl%3D1&description=5%20Challenging%20SQL%20Questions%20for%20Testing%20Your%20Skills)
-
- [Share on Tumblr](https://www.tumblr.com/share)
- [Share on WhatsApp (Opens in new window) WhatsApp](https://srinimf.com/2021/09/03/sql-table-5-top-interview-questions/?share=jetpack-whatsapp)
- [More](#)
-

- [Print (Opens in new window) Print](https://srinimf.com/2021/09/03/sql-table-5-top-interview-questions/?share=print)
- [Share on Reddit (Opens in new window) Reddit](https://srinimf.com/2021/09/03/sql-table-5-top-interview-questions/?share=reddit)
- [Share on Telegram (Opens in new window) Telegram](https://srinimf.com/2021/09/03/sql-table-5-top-interview-questions/?share=telegram)
- [Email a link to a friend (Opens in new window) Email](mailto:?subject=%5BShared%20Post%5D%205%20Challenging%20SQL%20Questions%20for%20Testing%20Your%20Skills&body=https%3A%2F%2Fsrinimf.com%2F2021%2F09%2F03%2Fsql-table-5-top-interview-questions%2F&share=email)
-

### Like this:

Like Loading…
