Jump to content
Xtreme .Net Talk

Recommended Posts

Posted (edited)

Hi

I use the next StoredProcedure in Access, Inserts Users to tblUsers:

INSERT INTO tblUsers ( UserName, Password, RetypePassword, Email, Comments )

VALUES (@UserName, @Password, @RetypePassword, @Email,@Comments);

 

How do i have to write it in SQL?

Thank's.

Edited by shlvy
Posted

create procedure dbo.PROCEDURE_NAME 
(@UserName varchar(255), @PassWord varchar(255), @RetypePassword varchar(255),
@Emal varchar(255), @Comments varchar(255))
AS
   INSERT INTO tblUsers
    (UserName, PassWord, RetypePassword, Email, Comments)
    VALUES
    (@UserName, @PassWord, @RetypePassword, @Email, @Comments)

GO

 

In this example you are passing the parameters (@) to the stored procedure.

"In the immortal words of Socrates, who said "' I drank what?!'"

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...