.Write steps to insert, update and delete the table of contents.
Answers
Explanation:
The INSERT INTO statement is used to insert new records in a table.
It is possible to write the INSERT INTO statement in two ways.
Syntax
The first way specifies both the column names and the values to be inserted.
If you are adding values for all the columns of the table, then no need to specify the column names in the SQL query. However, make sure that the order of the values is in the same order as the columns in the table.
INSERT INTO table_name (column1, column2, column3, ...)
VALUES (value1, value2, value3, ...);
'2nd way
INSERT INTO table_name
VALUES (value1, value2, value3, ...);
Example
Insert value in a 1st way. The column names are used here
INSERT INTO Employee (EmpId,LastName,FirstName,ADDRESS,City)
VALUES (1, 'XYZ', 'ABC', 'India', 'Mumbai' );
INSERT INTO Employee (EmpId,LastName,FirstName,ADDRESS,City)
VALUES (2, 'X', 'A', 'India', 'Pune' );
Insert value in a 2nd way.
INSERT INTO Employee
VALUES (3, 'XYZ', 'ABC', 'India', 'Mumbai' );
Select Statment in SQL
The SELECT statement is used to select data from a database.
The data returned is stored in a result table, called the result-set.
SELECT column1, column2, ...
FROM table_name;
Here, column1, column2, ... are the field names of the table you want to select from the data. If you want to select all the fields available in the table, use the following syntax:
SELECT * FROM table_name;
If the above query is executed, then all record is displayed.
Example
Select EmpId, LastName from Employee;
Select * from Employee;
Update Table
The UPDATE statement is used to modify the existing records in a table.
Syntax
UPDATE table_name
SET column1 = value1, column2 = value2, ...
WHERE conditio