当前位置: 代码迷 >> Sql Server >> Oracle转为MsSql,不知道如何弄
  详细解决方案

Oracle转为MsSql,不知道如何弄

热度:74   发布时间:2016-04-27 21:41:21.0
Oracle转为MsSql,不知道怎么弄啊
create   table   scott.test
as  
(
select   distinct   empno,ename,hiredate
from   scott.emp
where   empno> 7000
);

------解决方案--------------------
try

Select distinct empno,ename,hiredate Into scott.test
From scott.emp
where empno> 7000
------解决方案--------------------
create table scott.test
(
empno int,
ename varchar(50),
hiredate datetime
)
go
insert into scott.test
select distinct empno,ename,hiredate
from scott.emp
where empno> 7000
------解决方案--------------------


select * into scott.test from
(
select distinct empno,ename,hiredate
from scott.emp
where empno> 7000
)t
  相关解决方案