Professional Documents
Culture Documents
DBMS Assignment
DBMS Assignment
Commands:
CREATE
Example:
CREATE TABLE Students
(
ROLL_NO int(3),
NAME varchar(20),
SUBJECT varchar(20),
);
ALTER
For example, the command to add (then remove) a column named bubbles for
an existing table named sink is:
DROP
DROP TABLE table_name;
table_name: Name of the table to be deleted.
Data Manipulation Language (DML)
A data manipulation language (DML) is a computer programming
language used for adding (inserting), deleting, and modifying (updating) data in
a database. A DML is often a sublanguage of a broader database language such
as SQL, with the DML comprising some of the operators in the language. Read-
only selecting of data is sometimes distinguished as being part of a
separate data query language (DQL), but it is closely related and sometimes
also considered a component of a DML; some operators may perform both
selecting (reading) and writing.
Commands:
INSERT
INSERT INTO table_name VALUES (value1, value2, value3,…);
INSERT INTO Student VALUES (‘5′,’HARSH’,’WEST BENGAL’,’XXXXXXXXXX’,’19’);
UPDATE
UPDATE Student SET NAME = 'PRATIK' WHERE Age = 20;
DELETE
DELETE FROM Student WHERE NAME = 'Ram';