How to Create Database and Tables insert,edit,Delete using Procedure?

 Posted by Jayakumars on 9/29/2012 | Category: Sql Server Interview questions | Views: 1498 | Points: 40
Answer:

I have post the interview QA for SQl

Answer :

Create Proc Sp_GenrateDMLinSQL
as
USE master
Create Database Temp_2012

--USE Temp_2012
Create Table Tbl_Test
(
Id int primary key identity(1,1),
Ename varchar(200)
)
USE Temp_2012
--insert Query
Insert into Tbl_Test values('Jehovah Jireh');
Insert into Tbl_Test values('Jehovah Ruffa');
Insert into Tbl_Test values('Jehovah Raffa');
Insert into Tbl_Test values('Jehovah Nissi');
Insert into Tbl_Test values('Jayakumar');
Insert into Tbl_Test values('Test');
USE Temp_2012
--Update Query
Update Tbl_Test set Ename='Jesus Never Fail' where Id=5;
USE Temp_2012
--Delete Query
Delete from Tbl_Test where Id=6;


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response

More Interview Questions by Jayakumars