Professional Documents
Culture Documents
S_NO
Name
Marks
I. Display S_No. of those students whose name start with L and ends with A and Marks <70.
II. Display the name and S.NO of those students who have scored marks=95.
III. Display the names and marks of all the students who have scored marks between 75 and 90
Assignment-23( maam ne whatsapp mai bheja hai as 20)
Write SQL Quiers using data manipulation command, Insert records into table Named Employee
ASSIGNMENT-24
Q1 Discuss all the DDL commands with their syntax.
Solution: DDL or Data Definition Language actually consists of the SQL commands that can be
used to define the database schema. It simply deals with descriptions of the database schema and
is used to create and modify the structure of database objects in the database. DDL is a set of
SQL commands used to create, modify, and delete database structures but not data. These
commands are normally not used by a general user, who should be accessing the database via an
application.
1. CREATE TABLE:
Definition: "CREATE TABLE" is an SQL command that creates a new database table. It
specifies the table's structure by defining columns and their data types. You can also set
constraints, such as primary keys. This command establishes a blank canvas for storing data
in an organized manner.
column1 datatype,
column2 datatype,
...
);
employee_id NUMBER(3),
first_name VARCHAR(50),
last_name VARCHAR(50),
);
2. ALTER TABLE:
3. TRUNCATE TABLE:
Definition: "TRUNCATE TABLE" is an SQL command that swiftly removes all rows from
an existing table while preserving its structure. It is a non-reversible operation, commonly
employed to reset a table to an empty state, erasing existing data.
4. DROP TABLE: