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

SQL_Practical_File_Exp1_Exp2

The document outlines practical experiments for SQL commands, focusing on DDL and DML operations. Experiment 1 covers DDL commands such as CREATE, ALTER, and DROP to manage database structures, while Experiment 2 focuses on DML commands like INSERT, UPDATE, and DELETE for data manipulation. Each experiment includes objectives, theoretical explanations, and example SQL commands.
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)
0 views

SQL_Practical_File_Exp1_Exp2

The document outlines practical experiments for SQL commands, focusing on DDL and DML operations. Experiment 1 covers DDL commands such as CREATE, ALTER, and DROP to manage database structures, while Experiment 2 focuses on DML commands like INSERT, UPDATE, and DELETE for data manipulation. Each experiment includes objectives, theoretical explanations, and example SQL commands.
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

SQL Practical File - Experiments

Experiment No. 1 - DDL Commands (Create, Alter, Drop)

Objective:

To understand how to define, modify, and delete database structures using DDL commands.

Theory:

DDL includes SQL commands like CREATE, ALTER, DROP to define and manage table structures.

-- Create table
CREATE TABLE Student (
sno NUMBER(3),
sname CHAR(10),
class CHAR(5)
);

-- Alter table
ALTER TABLE Student ADD address VARCHAR(20);

-- Drop table
DROP TABLE Student;

SNO SNAME CLASS

1 Ravi BCA

2 Amit BCA
SQL Practical File - Experiments

Experiment No. 2 - DML Commands (Insert, Update, Delete)

Objective:

To learn how to manipulate data in the database using DML commands.

Theory:

DML includes INSERT, UPDATE, DELETE for managing records in a table.

-- Insert data
INSERT INTO Student (sno, sname, class, address)
VALUES (1, 'Ravi', 'BCA', 'Delhi');

-- Update data
UPDATE Student SET sname = 'Amit' WHERE sno = 1;

-- Delete data
DELETE FROM Student WHERE sno = 1;

SNO SNAME CLASS ADDRESS

2 Amit BCA Delhi

3 Sita BCA Noida

You might also like