create table #a (id int,name varchar(20),gh varchar(10)) insert into #a values (1,'小张', '20180101'),(2,'小刘', '20180102') select * from #a where gh=20180101 select * from #a where gh='20180101' gh的数据类型是varchar(),字符串数据类型不是应该加引号吗, 为什么加或者不加引号‘ ’ ,都能查出数据?