472,127 Members | 2,054 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,127 software developers and data experts.

Incorrect Syntax near the keyword 'IN'

Expand|Select|Wrap|Line Numbers
  2. CREATE PROCEDURE InsertStudent(In p1 nvarchar(50),In p2 nvarchar(50),In p3 nvarchar(50),In p4 nvarchar(50))
  4. AS
  6. BEGIN
  7. INSERT INTO STUDENT(roll,dob,phone,address) values(p1,p2,p3,p4)
  8. END
May 20 '12 #1
4 2298
465 Expert Mod 256MB
I don't see the word In being used in this procedure. Are you sure it's this proc that's erroring on you?
May 21 '12 #2
12,516 Expert Mod 8TB
Get rid of the IN keyword in your parameter list.
May 21 '12 #3
Expand|Select|Wrap|Line Numbers
  1. CREATE PROCEDURE ProcedureName
  2. @var1 nvarchar(50),
  3. @var2 nvarchar(50)
  4. AS
  5. BEGIN
  6.     ................write insert query here................
  7. END
May 21 '12 #4
32,497 Expert Mod 16PB
Procedure parameters are not declared with an "IN" keyword. You may be confusing this with the "OUT" | "OUTPUT" keyword which is sometimes used in parameter declarations. See MSDN: CREATE PROCEDURE (Transact-SQL) for the full SP.
May 21 '12 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Jeff Magouirk | last post: by
11 posts views Thread by Mark Findlay | last post: by
2 posts views Thread by ielmrani via SQLMonster.com | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.