1.Oracle表名、字段名不区分大小写,Sybase严格区分
2.Oracle中to_char()/to_date() —Sybase的convert()
–Oracle:to_char(sysdate,’dd-mm-yyyy day’),to_date(string,format)
–Sybase:convert(char(15),日期,108),convert(datetime,string,108)
–末尾附 Sybase convert第三个参数介绍
3.Oracle中 substr() — Sybase的 substring()
4.Oracle中 nvl() — Sybase的 isnull()
5.Oracle取系统时间 sysdate — Sybase的 getdate()
6.Oracle的decode — Sybase的 case when then
–Oracle: select decode(param,null,resultA,resultB) from res;
–Sybase:select case when param is null then resultA else resultB
end from res;
7.外连接
–Oracle:select * from tableA a ,tableB b where a.id=b.id(+);
–Sybase:select * from tableA a,tableB b where a.id*=b.id;
8.insert 方法
–Oracle:insert into tableA(select * from tableB where tableB.id=””);
–Sybase:insert into tableA(id,name,age)(select * from tableB where
tableB.id=””); insert的表必须写清列名
附:Sybase convert第三个参数介绍
那是说明你在把时间转化为字符串行时所要保存的格式
101 USA mm/dd/yy
102 ANSI yy.mm.dd
103 British/French dd/mm/yy
104 German dd.mm.yy
105 Italian dd-mm-yy
106 – dd mon yy
107 – Mon dd, yy
108 – hh:mm:ss
109 (*) Default + milliseconds mon dd yyyy
hh:mi:ss:mmmAM (or PM)
110 USA mm-dd-yy
111 JAPAN yy/mm/dd
112 ISO yymmdd
113 (*) Europe default + milliseconds dd mon yyyy
hh:mm:ss:mmm(24h)
114 – hh:mi:ss:mmm(24h)
120 (*) ODBC canonical yyyy-mm-dd hh:mi:ss(24h)
121 (*) ODBC canonical (with milliseconds) yyyy-mm-dd
hh:mi:ss.mmm(24h)
126(***) ISO8601 yyyy-mm-dd Thh:mm:ss:mmm(no spaces)
130* Kuwaiti dd mon yyyy hh:mi:ss:mmmAM
131* Kuwaiti dd/mm/yy hh:mi:ss:mmmAM
相关