Dear All,
if you face some time error in mysql sss
Thank you for read.........
if you face some time error in mysql sss
CREATE TABLE tbl_Students
(
[Studentid] [int] IDENTITY(1,1) NOT NULL,
[Firstname] [nvarchar](200) NOT NULL,
[Lastname] [nvarchar](200) NULL,
[Email] [nvarchar](100) NULL
)
Support we insert the following data into the above table:-
Insert into tbl_Students (Firstname, lastname, Email)
Values('Vivek', 'Johari', 'vivek@abc.com')
Insert into tbl_Students (Firstname, lastname, Email)
Values('Pankaj', 'Kumar', 'pankaj@abc.com')
Insert into tbl_Students (Firstname, lastname, Email)
Values('Amit', 'Singh', 'amit@abc.com')
Insert into tbl_Students (Firstname, lastname, Email)
Values('Manish', 'Kumar', 'manish@abc.comm')
Insert into tbl_Students (Firstname, lastname, Email)
Values('Abhishek', 'Singh', 'abhishek@abc.com')
Now, while writing a Stored Procedure, the first step will be to write the Create Procedure statement as the first statement,
Create PROCEDURE Getstudentname( @studentid INT --Input parameter , Studentid of the student ) AS BEGIN SELECT Firstname+' '+Lastname FROM tbl_Students WHERE studentid=@studentid END
/* This Stored procedure is used to Insert value into the table tbl_students. */ Create Procedure InsertStudentrecord ( @StudentFirstName Varchar(200), @StudentLastName Varchar(200), @StudentEmail Varchar(50) ) As Begin Insert into tbl_Students (Firstname, lastname, Email) Values(@StudentFirstName, @StudentLastName,@StudentEmail) End
This is my table
CREATE TABLE [dbo].[mtblUser]( [Sno] [nvarchar](50) NULL, [UserId] [nvarchar](50) NULL, [Password] [nvarchar](50) NULL, [UserName] [nvarchar](50) NULL, [Email] [nvarchar](50) NULL, [GroupIn] [nvarchar](50) NULL, [UserType] [nvarchar](50) NULL, [EmpID] [nvarchar](10) NULL, [Designation] [nvarchar](50) NULL, [SubGroup] [nvarchar](50) NULL, [ViewGroup] [nvarchar](50) NULL, [Status] [nvarchar](50) NULL ) ON [PRIMARY]