Tuesday, August 10, 2010

Creating simple stored procedure

Here you can learn how to create a simple stored procedure..

You should follow the below step after login in sql server.
Be sure that you are logged in sql server.


SIMPLE INSERT QUERY


Select your database as shown here.



Click on new query as shown here.


Write below code in that file.



Here mylogin is a stored procedure name and logintable is table name.


Create procedure mylogin
@id varchar(50),
@name varchar(50),
@pass varchar(50)
as
insert into logintable values(@id,@name,@pass)



After writing the code press F5. or select Execute query.


You will get a message as shown here.





Here is the way how to see stored procedure.




After refreshing you will get your stored procedure with prefix dbo.procedurename

Enjoy….

google

Get higher pagerank
Get higher pagerank by submitting to our directory

No comments: