Re: Incorrect syntax near the keyword 'Close'
From: Wayne Snyder (wayne.nospam.snyder_at_mariner-usa.com)
Date: 09/26/04
- Next message: Milton Sales: "Re: SBS 2000 version of SQL2000 - ?limitations"
- Previous message: Wayne Snyder: "Re: Cannot modify data"
- In reply to: fniles: "Incorrect syntax near the keyword 'Close'"
- Next in thread: Dan Guzman: "Re: Incorrect syntax near the keyword 'Close'"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 26 Sep 2004 09:31:42 -0400
If you use keywords( documented in Books on line) as the names of ANY
objects in SQL you must brace them if
create table [OPEN]
([Key] int not null)
It is a good idea NOT to use reserve words if you can avoid it, because
you'll be forgetting to use the brackets and re-doing code over and
over(kind of annoying.)
-- Wayne Snyder, MCDBA, SQL Server MVP Mariner, Charlotte, NC www.mariner-usa.com (Please respond only to the newsgroups.) I support the Professional Association of SQL Server (PASS) and it's community of SQL Server professionals. www.sqlpass.org "fniles" <fiefieniles@yahoo.com> wrote in message news:2067fd92.0409251452.60e065d7@posting.google.com... > When I created a SQL Server database by running a script, it gave me a > few errors like the following: > > Incorrect syntax near the keyword 'KEY'. > Incorrect syntax near the keyword 'Close'. > Incorrect syntax near the keyword 'Open'. > > Is this because those words (Key, CLose and Open) are reserved words ? > > Thanks.
- Next message: Milton Sales: "Re: SBS 2000 version of SQL2000 - ?limitations"
- Previous message: Wayne Snyder: "Re: Cannot modify data"
- In reply to: fniles: "Incorrect syntax near the keyword 'Close'"
- Next in thread: Dan Guzman: "Re: Incorrect syntax near the keyword 'Close'"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|