我有以下访问sql语句:
SELECT *
FROM (SELECT [Occurrence Number], [Occurrence Date], [1 0 Preanalytical (Before Testing)], [Cup Type], NULL as '2 0 Analytical (Testing Phase)', [2 0 Area], NULL,NULL FROM [Lab Occurrence Form]
WHERE NOT ([1 0 Preanalytical (Before Testing)] IS NULL)
在此:NULL as '2 0 Analytical (Testing Phase)'
,当它显示列时,它显示单引号。如果我完全删除引号它会给我一个错误,如果我使用双引号它会在结果表中显示双引号
是否可以不显示任何引号?
答案 0 :(得分:3)
在列名称周围使用方括号,在字符串周围使用单引号。请尝试使用方括号:
NULL as [2 0 Analytical (Testing Phase)]
答案 1 :(得分:1)
使用与您相同的语法
NULL as [2 0 Analytical (Testing Phase)]