You are on page 1of 2

Practical no.

2
Aim: Inserting and Deleting values from tables

Intserting: Insert command is used to add rows of data to an existing table. Once you know the
table's structure, you can construct a command that matches the table's columns with the corresponding
values you wish to insert for the new record.

The basic syntax of the command looks like this:

INSERT INTO my_table(column1, column2)

VALUES ('value1', 'value2');

Deleting: DELETE command is used to remove rows from tables, functioning as the
complementary action to INSERT. In order to remove rows from a table, you must identify the rows you
wish to target by providing match criteria within a WHERE clause.

The basic syntax looks like this:

DELETE FROM <table>

WHERE <condition>;

Roll no: 220010800069


Outputs:

Roll no: 220010800069

You might also like