Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Urgent: Really Need help on this 1

Status
Not open for further replies.

s2001

Programmer
Dec 7, 2001
132
US
I am trying to create database with a field name Desc.

Here's the code:

Create Table Test (FName Varchar(30), Desc Varchar(50));

But i get an error in syntax near Desc.. I guess i figured out that Desc is a reserved..but does any of you guys know a work around..

let me know thanks

Thanks

Murali Bala
 
thanx. but i can't rename the column.

Murali Bala
 
You can't pick a better name for a column in a table named "Test"?

If by some astounding set of circumstances you are physically prevented from picking a more appropriate column name, you can use reserved words as column names by surrounding them with backticks.

However, this is an extraordinarily bad idea and may cause other problems with software.


Want the best answers? Ask the best questions: TANSTAAFL!!
 
thanks i did change the column name..but now i have another issue..i am creating a table called Check.

Create table Check (IssuedTo Varchar(41))

again i am getting an error..any work around would be highly appreciated.
I have to stick to this format (can't change the table name)

In Sql server you can actually put brackets around the name like [Check]..but could do it MySql.

Murali Bala
 
thanx a lot..so do you know a work around for this..is it using backticks

Murali Bala
 
thanx a bunch everythings seems to be woking.

Murali Bala
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top