如何检查SQL中的两个字符串条件
当我编写以下查询时:如何检查SQL中的两个字符串条件,sql,Sql,当我编写以下查询时: select * from tablename where cloumn1 = "String1" and column2 = "String2"; 我犯了一个错误 String2:无效标识符 删除双引号 像这样 select * from tablename where cloumn1 = 'String1' and column2 = 'String2'; 删除双引号 像这样 select * from tablename where cloumn
select *
from tablename
where cloumn1 = "String1"
and column2 = "String2";
我犯了一个错误
String2:无效标识符
删除双引号
像这样
select *
from tablename
where cloumn1 = 'String1'
and column2 = 'String2';
删除双引号
像这样
select *
from tablename
where cloumn1 = 'String1'
and column2 = 'String2';
你试过单引号吗?这是用于哪种RDBMS的?请添加一个标记,以指定您使用的是
mysql
、postgresql
、sql server
、oracle
还是db2
——还是其他完全相同的东西。单引号很有用,因为您尝试过单引号吗?这是用于哪个RDBMS的?请添加一个标记,以指定您使用的是mysql
、postgresql
、sql server
、oracle
还是db2
——还是其他完全相同的东西。单引号有帮助,谢谢causita