0

I have a column name "user id" now when I use it in insert or... all of the following tries gave me syntax error:

insert into mytbl('user id',..
insert into mytbl(['user id'],..
insert into mytbl([user id],..

How can I solve this problem?

Please let me knbow if you need more clarification

Thanks

DoNotArrestMe
  • 1,285
  • 1
  • 9
  • 20
user385729
  • 1,846
  • 7
  • 27
  • 40

1 Answers1

5

Wrap it in ticks:

INSERT INTO mytbl(`user id`,..

to reffer to a table use

    tbl1.`user name`
echo_Me
  • 36,552
  • 5
  • 55
  • 77
John Conde
  • 212,985
  • 98
  • 444
  • 485