0% found this document useful (0 votes)
6 views

Chapter 2- Structured Query Language in Action

Uploaded by

Ankita Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Chapter 2- Structured Query Language in Action

Uploaded by

Ankita Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Chapter 2: Structured Query Language in Action

A. Select the correct option.


1. c. Create
2. b. DROP TABLE
3. c. =
4. c. TEXTFIELD
5. DESC
6. To change the structure of an existing table

B. Fill in the blanks.


1. NOT NULL
2. INSERT INTO
3. Primary
4. YYYY-MM-DD
5. Insensitive

C. Write T for True and F for False.


1. F
2. T
3. F
4. T
5. T

D. Answer the following questions.

1. The two characteristics of SQL are: -


a. SQL can handle different databases and manage various kinds of data.
b. SQL helps organise data into tables with rows and columns, making it easy to
find and use.

2. The Primary key helps identify each record in a table uniquely. Each table can have
only one primary key. Whereas a foreign key creates a link between two tables. It
ensures that a value in one table matches a valid value in another table. A table can have
more than one foreign key.

3. The SQL commands can be categorised as:


a. Data Definition Language (DDL) commands: These commands are used to define and
modify the structure of a database. For example, CREATE, ALTER, etc.

b. Data Manipulation Language (DML) commands: These commands are used to


manage and modify the data in a database. For example, SELECT, UPDATE, etc.

4. The SELECT statement fetches data from one or more tables. This statement, allows
you to obtain records from all the fields or specified fields that match the defined criteria.
5. The ALTER TABLE statement is used to add, delete, or modify columns in an
existing table. The ALTER command is always used in conjunction with the ADD,
DROP, and MODIFY commands, depending on the requirement. While the UPDATE
command is used to modify or change existing records in a table.

E. Competency-based questions.

1. Primary key
2. SELECT title, genre, release_year
FROM Movies
WHERE release_year > 2020;

EXTRA QUESTIONS

Q1. SQL Commands:-

1. Creates a new table – CREATE


2. Modifies an existing table – ALTER
3. Delete the table – DROP
4. Retrieves data – SELECT
5. Modifies existing data – UPDATE
6. View the list of an existing database – SHOW DATABASE
7. Symbol to retrieve entire data from the table – Asterisk(*)

You might also like