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,924
  • 9
  • 29
  • 42

1 Answers1

5

Wrap it in ticks:

INSERT INTO mytbl(`user id`,..

to reffer to a table use

    tbl1.`user name`
echo_Me
  • 37,078
  • 5
  • 58
  • 78
John Conde
  • 217,595
  • 99
  • 455
  • 496