字符串用单引号 双引号表示表, 字段名等对象。例如 select * from table_name where id=1;这种代表查询的是数字 select * from table_name where id='1';这种代表查询的是字符 如果是双引号是这样,假如你有个表的字段叫sysdate,因为sysdate属于oracle中的特有字符,但你要查询这个字段的时候 select "sysdate" from table_name; 但是你要是用 select 'sysdate' from table_name; 那么你查出来的就是字符串,结果是sysdate
双引号表示表, 字段名等对象。例如
select * from table_name where id=1;这种代表查询的是数字
select * from table_name where id='1';这种代表查询的是字符
如果是双引号是这样,假如你有个表的字段叫sysdate,因为sysdate属于oracle中的特有字符,但你要查询这个字段的时候
select "sysdate" from table_name;
但是你要是用
select 'sysdate' from table_name;
那么你查出来的就是字符串,结果是sysdate