Invalid column name when selecting

前端 未结 3 618
伪装坚强ぢ
伪装坚强ぢ 2021-01-29 07:31

I have a table called Jobs with the following column names: JobID, Name, and Value. The table is filled like just one entry:

相关标签:
3条回答
  • 2021-01-29 08:18

    Use ' instead of ". It will work.

    0 讨论(0)
  • 2021-01-29 08:20

    Use single quotes instead of double quotes. Single quotes are the standard for SQL string and date constants:

    select *
    from Job
    where Name = 'TestJob';
    

    Some databases do accept double quotes for this purpose. It is always safest to use single quotes for string and date constants and double quotes to escape identifier names (if needed).

    0 讨论(0)
  • 2021-01-29 08:28

    Change your double quotes " to single quotes '. Double quotes are used to surround object names, probably in the same way [] can be used, so you can have spaces and other normally-invalid object name characters in the object name. Single quotes, on the other hand, are used for string literals.

    0 讨论(0)
提交回复
热议问题