sqlserver


select f.auditEmail from TR_WTR_ITEM f where f.auditEmail like '%@nokia.com' and f.auditEmail is not null


select count(f.auditEmail) from TR_WTR_ITEM f where f.auditEmail=''
and f.auditEmail like '%@%'

 

select count(f.auditEmail) from TR_WTR_ITEM f where ISNULL(f.auditEmail , '')<>''
and f.auditEmail like '%@%'

update TR_WTR_ITEM  set auditEmail = auditEmail+'@nokia.com'
where  ISNULL(auditEmail , '')<>'' and auditEmail not like '%@%'

 

insert into oldtable select * from oldTable

INSERT INTO SELECT语句

      语句形式为:Insert into Table2(field1,field2,...) select value1,value2,... from Table1

 

SELECT INTO FROM语句

      语句形式为:SELECT vale1, value2 into Table2 from Table1

 

posted @ 2016-04-25 14:41  上官沐沐  阅读(157)  评论(0编辑  收藏  举报