—————Creating Table with 4 columns—————–

create table tblEmployee
(
Empid int,
LastName varchar(255),
FirstName varchar(255),
EmailId varchar(255)
);
————–Inserting Records Dynamically—————
DECLARE @id int
SET @id = 1
WHILE @id<5
BEGIN
INSERT INTO tblEmployee values (@id,‘Fname’,‘Lname’,‘Fname.Lname@xyz.com’)
SET @id=@id+1
END
—————Retrieving Inserting Records—————–
select * from tblEmployee

—————Getting Total Count———————————
select COUNT(*) as total from tblEmployee

cret

—————Updating Record —————–

Update tblEmployee
set LastName = ‘Ponnaganti’,FirstName=‘Nagendra’,EmailId=‘Nagendra.Ponnagnti@crudsys.com’
where Empid = 1

update

—————Deleting Record—————–

Delete tblEmployee where Empid= 4

select * from tblEmployee

delete

happ