SqlServer 저장 프로 세 스 를 Oracle 저장 프로 세 스 문법 으로 변환 하 는 흔 한 문제
3837 단어 DB프로 그래 밍 개발
:
sqlserver: order by top
oracle: rownum order by
2. 기 존 데이터 의 필드 형식 이 일치 하지 않 습 니 다. 다음 문 구 를 통 해 수정 합 니 다.
alter table css_sed rename column action to myaction;
alter table css_sed add (action varchar2(20));
update css_sed set action = myaction;
alter table css_sed drop column myaction;
3. 여러 캐 스 트 문제
isnull(cast(cast(GR_WT as int) as varchar),'') sqlserver
nvl(cast(trunc(cntr_row.GR_WT) as varchar2),'') plsql
4. 문제 가 있 는 경우
oracle
:
begin
select count(*) into V_CNT from all_tables where table_name = 'CUST_BC_ONLINE';
if(V_CNT > 0)
then
execute immediate 'truncate table CUST_BC_ONLINE';
end if;
end;
5. SqlServer: with index () 문법 문제
Oracle: index hints eg: select /*+ index(t i_t) */ * from t where username='EYGLE';
질문
isnull(MCS_SHPT_INFO.LAST_MOD_DT,0) < b.LAST_MOD_DT
nvl(MCS_SHPT_INFO.LAST_MOD_DT,to_date('1900-01-01','yyyy-mm-dd'))) < b.LAST_MOD_DT
질문
select top(5) @param = column from table
sqlserver ,oracle , 。
8. declare 의 변 수 는 뒤에 있 는 begin end 구문 블록 만 사용 할 수 있 습 니 다.
질문
oracle: null , null
sqlserver: null ,
10. Oracle 이상 정보 인쇄
dbms_output.put_line(dbms_utility.format_error_stack());
dbms_output.put_line('----------------------------------------------------------------');
dbms_output.put_line(dbms_utility.format_call_stack());
dbms_output.put_line('----------------------------------------------------------------');
dbms_output.put_line(dbms_utility.format_error_backtrace());
dbms_output.put_line('----------------------------------------------------------------');
dbms_output.put_line(sqlcode);
dbms_output.put_line(sqlerrm);
11. SqlServer: select into 문법 문제
SqlServer:
select into table2 from table1
:table2
Oracle:
insert into table2 select * from table1
: table2
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
Confluence에서 PlantUML을 사용하여 ER 다이어그램을 텍스트 기반으로 작성외래 키 제약이 완벽하게 작성된 환경이라면, 리버스 엔지니어링으로 자동으로 ER 다이어그램을 작성해 주는 툴은 상당히 있을까 생각합니다. 그러나 외래 키 제약 조건이 유지되지 않는 환경에서는 수동으로 관계를 결정해야...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.