SQL Server Data manipulation language interview questions
Define Data manipulation
language.
Explain the command
Select, Insert, Update and Delete with syntax.
SQL Server Data manipulation language- Nov 18, 2008 at 15:30 pm
by Rajmeet Ghai
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.
Explain the command Select, Insert, Update and Delete with syntax.
Answer
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
Example:
Select * from customer;
b. Insert: Insert statement is used to insert data (row) in a
table.
Syntax:
Insert into table_name
Values (value1, 2 ..)
Example:
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 customer Set first_name=’john’ Where last_name=’james’;
Also read
Define Data control language, Explain the command Grant, Revoke
and Deny with syntax.............
Define Data definition language, What are the capabilities of
Cursors?..........
Explain Data Definition Language, Data Control Language and Data Manipulation
Language..............
Answer - The start and end of each transaction......
Answer - Data definition language is used to
define and manage all attributes and properties of a
database.....
Answer - Null means no entry has been made. It implies that the
value is either unknown or undefined.....
|