SQL Query Syntax Error - Spaces in Field Names

前端 未结 5 621
囚心锁ツ
囚心锁ツ 2021-02-08 13:49

The database my application uses has field names containing spaces. I believe this to be the cause of my problem. Here is a typical query:

SELECT * FROM \'OV2          


        
5条回答
  •  执笔经年
    2021-02-08 14:17

    Replace ' with

    • postgreSQL, Oracle: "
    • MySQL `
    • SQL-server: [ and ]

    For example: "OV2 BAS", bas."Ref ID" = ids."Ref ID", etc.

提交回复
热议问题