表A字段Id 为numberic(18,0),哪个SQL语句是错误的:

  select * from A where id='';
  select * from A where id='13';
  select * from A where id=null;
  select * from A where id=' 13';

 

select * from A where id='';  报错,因为''为空字符串。
select * from A where id='13';不报错,因为系统默认把字符串13转为数字13
select * from A where id=null;不报表,null值什么类型都能代替。
select * from A where id=' 13';报表,' 13'有空格,为字符串。
posted on 2014-05-30 10:57  清风暮雨  阅读(178)  评论(0)    收藏  举报