HOW TO CREATE TABLE IN SQL SERVER

STEP 1:- CREATE TABLE

CREATE TABLE tblEmployees
(
Id  int primary key,
EmpName   varchar(50),
Gender    varchar(50),
Salary    int
)



STEP 2:- INSERT VALUES INTO TABLE


INSERT INTO tblEmployees VALUES(1,'mark','male',15000),
                               (2,'mike','male',20000),
                               (3,'mary','female',25000)

                                OR


        INSERT INTO tblEmployees VALUES(1,'mark','male',15000)
        INSERT INTO tblEmployees VALUES(2,'mike','male',20000)
        INSERT INTO tblEmployees VALUES(3,'mary','female',25000)


No comments:

Post a Comment