34,587
社区成员
发帖
与我相关
我的任务
分享
create table tb (nvarchar1 varchar(10),nvarchar2 varchar(10),datetime1 datetime,float1 int)
insert into tb select null,'一值','2007-1-28',21
insert into tb select null,'二值','2007-1-29',22
select * from tb
where year(datetime1)=2007 and nvarchar2='一值'
select * from table where year(datetime1) = 2007 and rtrim(nvarchar2)='一值'
nvarchar2是oracle的东西吧?
--存在空格?试着去下空格看看
select * from table where year(datetime1)=2007 and replace(nvarchar2,' ','')='一值'