BUG: Table Designer Does Not Allow Apostrophe in Column Name

ID: Q196768

The information in this article applies to:

BUG #: 50881 (SQLBUG_70)

SYMPTOMS

In Microsoft SQL Server, you can use SQL statements to create a table in which a column name contains an apostrophe. However, when you attempt to edit the table with the Table Designer tool, changes are not saved and you may receive the following error message:

   Unable to modify table.
   ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Line 2:
   Incorrect syntax near 's'.
   [Microsoft][ODBC SQL Server Driver][SQL Server]Unclosed quotation mark
   before the character string ')'.

If you use the Table Designer tool to create the table, the tool does not allow you to use an apostrophe in column names.

WORKAROUND

If you want to use the Table Designer tool to edit the table design, do not use apostrophes in your column names.

STATUS

Microsoft has confirmed this to be a problem in SQL Server version 7.0.

Additional query words: prodsql 7.00

Keywords          : kbbug7.00 
Version           : WINNT:7.0
Platform          : winnt
Issue type        : kbbug
Solution Type     : kbpending

Last Reviewed: December 5, 1998