Monday, August 16, 2010

Creating simple SELECT 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 SELECT QUERY


Select your database as shown here.



Click on new query as shown here.


Write below code in that file.



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





create procedure selectlogin

@id varchar(50)
as
select * from logintable where id=@id



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

No comments: