Define Data manipulation language.
Answer
Data manipulation language is used for managing data. Managing data would mean retrieving, inserting, deleting or updating data. SQL is the most common data manipulation language. SELECT, INSERT, UPDATE keywords are a part of Data manipulation language. Data manipulation language can be procedural or declarative.
Data manipulation language is used for managing data. Managing data would mean retrieving, inserting, deleting or updating data. SQL is the most common data manipulation language. SELECT, INSERT, UPDATE keywords are a part of Data manipulation language. Data manipulation language can be procedural or declarative.
Explain the command Select, Insert, Update and Delete with syntax.
Answer
a. Select: Select statement is used to select data from a table.
a. Select: Select statement is used to select data from a table.
Syntax:
Select column_name
From table_name
For selecting all columns
Select * from table_name
Select column_name
From table_name
For selecting all columns
Select * from table_name
Example:
Select * from customer;
Select * from customer;
b. Insert: Insert statement is used to insert data (row) in a table.
Syntax:
Insert into table_name
Values (value1, 2 ..)
Insert into table_name
Values (value1, 2 ..)
Example:
Insert into customer values (1,’steve’,’james’);
Insert into customer values (1,’steve’,’james’);
c. Update: Update statement is used to update existing data (row) in a table. It is used to update some column value by specifying a condition.
Syntax:
Update table_name Set column_name1= ‘value’, column_name2=’value2’ Where column_name3=’value3’
Example:Update table_name Set column_name1= ‘value’, column_name2=’value2’ Where column_name3=’value3’
Update customer Set first_name=’john’ Where last_name=’james’

0 Comments:
Post a Comment