education DML sql server
in previous articles have discussed how to create a database and table using the Data Definition Language (DDL).
Now I will discuss about the use of Data Manipulation Language (DML) in SQLServer 2005.
In the Data Manipulation Language (DML) commands that are commonly used are:
-Insert
-Select
-Update
-Delete
First we will discuss first how to use the Insert, this command is used to save data to the table
syntax for the insert command structure is as follows:
INSERT INTO [Table Name] VALUES (<datafield>, <datafield>, <datafield>)
Examples of the use of insert DML syntax:
INSERT INTO t_user VALUES ('001 ',' admin ',' male ')
To store data only in a particular field, we use the following command:
example:
INSERT INTO t_user (IdUser, name) VALUES ('002 ',' user1 ')
Comments
Post a Comment