Create PROCEDURE usp_demo (@TableName varchar(90),@ID varchar(90),@FName
varchar(90),@LName varchar(90),@PNum Varchar(90), @Email Varchar(90))
as
BEGIN
declare @SQL nvarchar(1000)
SELECT @SQL = 'Create Table ' + @TableName + ' ('SELECT @SQL = @SQL +'' +@ID+
' int NOT NULL Primary Key,' +@FName+ ' VarChar(10),' +@LName+ ' Varchar(90),'
+@PNum+ ' Varchar(90),' +@Email+ ' Varchar(90))'
SET @SQL = @SQL
EXECUTE SP_EXECUTESQL @SQL
END
No comments:
Post a Comment