??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲精品国产综合区久久久久久久,国产对白在线正在播放,成人av中文字幕http://www.aygfsteel.com/kingeleven/category/28094.html要么忙着生存Q要么赶着LQhL要做点什么的!zh-cnThu, 03 Jan 2008 13:25:15 GMTThu, 03 Jan 2008 13:25:15 GMT60Javaq接各种数据库的实例http://www.aygfsteel.com/kingeleven/articles/172523.htmlvvvvThu, 03 Jan 2008 09:29:00 GMThttp://www.aygfsteel.com/kingeleven/articles/172523.htmlhttp://www.aygfsteel.com/kingeleven/comments/172523.htmlhttp://www.aygfsteel.com/kingeleven/articles/172523.html#Feedback0http://www.aygfsteel.com/kingeleven/comments/commentRss/172523.htmlhttp://www.aygfsteel.com/kingeleven/services/trackbacks/172523.html1、Oracle8/8i/9i数据库(thin模式Q?/strong>

            

Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();

String url="jdbc:oracle:thin:@localhost:1521:orcl";

//orcl为数据库的SID

String user="test";

String password="test";

Connection conn= DriverManager.getConnection(url,user,password);



2?a style="font-size: 14px; color: #0000ff; text-decoration: none" target="_blank">DB2数据?/strong>

            

Class.forName("com.ibm.db2.jdbc.app.DB2Driver ").newInstance();

String url="jdbc:db2://localhost:5000/sample";

//sampleZ的数据库?br />
String user="admin";

String password="";

Connection conn= DriverManager.getConnection(url,user,password);



3、Sql Server7.0/2000数据?/strong>

            

Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();

String url="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=mydb";

//mydb为数据库

String user="sa";

String password="";

Connection conn= DriverManager.getConnection(url,user,password);



4、Sybase数据?/strong>

            

Class.forName("com.sybase.jdbc.SybDriver").newInstance();

String url =" jdbc:sybase:Tds:localhost:5007/myDB";

//myDBZ的数据库?br />
Properties sysProps = System.getProperties();

SysProps.put("user","userid");

SysProps.put("password","user_password");

Connection conn= DriverManager.getConnection(url, SysProps);



5、Informix数据?/strong>

            

Class.forName("com.informix.jdbc.IfxDriver").newInstance();

String url =

"jdbc:informix-sqli://123.45.67.89:1533/myDB:INFORMIXSERVER=myserver;

user=testuser;password=testpassword";

//myDB为数据库?br />
Connection conn= DriverManager.getConnection(url);



6、MySQL数据?/strong>

            

Class.forName("org.gjt.mm.mysql.Driver").newInstance();

String url ="jdbc:mysql://localhost/myDB?

user=soft&password=soft1234&useUnicode=true&characterEncoding=8859_1"

//myDB为数据库?br />
Connection conn= DriverManager.getConnection(url);



7、PostgreSQL数据?/strong>

            

Class.forName("org.postgresql.Driver").newInstance();

String url ="jdbc:postgresql://localhost/myDB"

//myDB为数据库?br />
String user="myuser";

String password="mypassword";

Connection conn= DriverManager.getConnection(url,user,password);



vv 2008-01-03 17:29 发表评论
]]>
PostgreSQL ?Oracle 相异? Q{Q?/title><link>http://www.aygfsteel.com/kingeleven/articles/172487.html</link><dc:creator>vv</dc:creator><author>vv</author><pubDate>Thu, 03 Jan 2008 06:56:00 GMT</pubDate><guid>http://www.aygfsteel.com/kingeleven/articles/172487.html</guid><wfw:comment>http://www.aygfsteel.com/kingeleven/comments/172487.html</wfw:comment><comments>http://www.aygfsteel.com/kingeleven/articles/172487.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/kingeleven/comments/commentRss/172487.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/kingeleven/services/trackbacks/172487.html</trackback:ping><description><![CDATA[<table style="width: 517pt; border-collapse: collapse" cellspacing="0" cellpadding="0" width="688" border="0" x:str=""> <tbody> <tr style="height: 44.25pt; mso-height-source: userset" height="59"> <td class="xl49" style="border-right: #ece9d8; border-top: #ece9d8; border-left: #ece9d8; width: 517pt; border-bottom: windowtext 1.5pt solid; height: 44.25pt; background-color: transparent" width="688" colspan="4" height="59"><font face="QS Qゴ゗? size="3"><strong>ORACLE ?PostgreSQL 相异?/strong></font></td> </tr> <tr style="height: 15pt" height="20"> <td class="xl23" style="border-right: windowtext 1.5pt solid; border-top: windowtext; border-left: windowtext 1.5pt solid; border-bottom: windowtext 1.5pt solid; height: 15pt; background-color: yellow" height="20"><font face="QS Qゴ゗? size="2"><strong>NO</strong></font></td> <td class="xl24" style="border-right: windowtext 1.5pt solid; border-top: windowtext; border-left: windowtext; border-bottom: windowtext 1.5pt solid; background-color: yellow"><font face="GB BiaoTiSong" size="2"><strong>问题?/strong></font></td> <td class="xl25" style="border-right: windowtext 1.5pt solid; border-top: windowtext; border-left: windowtext; border-bottom: windowtext 1.5pt solid; background-color: yellow"><font face="QS Qゴ゗? size="2"><strong>Oracle</strong></font></td> <td class="xl25" style="border-right: windowtext 1.5pt solid; border-top: windowtext; border-left: windowtext; border-bottom: windowtext 1.5pt solid; background-color: yellow"><font face="QS Qゴ゗? size="2"><strong>PostgreSQL</strong></font></td> </tr> <tr style="height: 57.75pt; mso-height-source: userset" height="77"> <td class="xl36" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext 0.5pt solid; border-bottom: windowtext 0.5pt solid; height: 57.75pt; background-color: silver" align="right" height="77" x:num=""><strong><font face="QS Qゴ゗? size="2">1</font></strong></td> <td class="xl28" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; border-bottom: windowtext 0.5pt solid; background-color: transparent"><font face="QS Qゴ゗?>DUAL</font></td> <td class="xl28" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; border-bottom: windowtext 0.5pt solid; background-color: transparent"><font face="QS Qゴ゗?>SELECT 1+1 FROM DUAL</font></td> <td class="xl29" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 233pt; border-bottom: windowtext 0.5pt solid; background-color: transparent" width="310"><font face="QS Qゴ゗?>SELECT<span style="mso-spacerun: yes">  </span>1+1 <br /> 或?br /> CREATE VIEW dual AS <br /> <span style="mso-spacerun: yes">      </span>SELECT 'X'::VARCHAR(1) AS DUMMY<br /> ?SELECT 1+1 FROM DUAL</font></td> </tr> <tr style="height: 24pt; mso-height-source: userset" height="32"> <td class="xl37" style="border-right: windowtext 0.5pt solid; border-top: #ece9d8; border-left: windowtext 0.5pt solid; border-bottom: windowtext 0.5pt solid; height: 24pt; background-color: silver" align="right" height="32" x:num=""><strong><font face="QS Qゴ゗? size="2">2</font></strong></td> <td class="xl27" style="border-right: windowtext 0.5pt solid; border-top: #ece9d8; border-left: windowtext; border-bottom: windowtext 0.5pt solid; background-color: transparent"><font face="QS Qゴ゗?>NEXTVAL</font></td> <td class="xl30" style="border-right: windowtext 0.5pt solid; border-top: #ece9d8; border-left: windowtext; width: 230pt; border-bottom: windowtext 0.5pt solid; background-color: transparent" width="306"><font face="QS Qゴ゗?>SELECT A_TABLE_SEQUENCE.NEXTVAL<br /> FROM<span style="mso-spacerun: yes">   </span>DUAL</font></td> <td class="xl30" style="border-right: windowtext 0.5pt solid; border-top: #ece9d8; border-left: windowtext; width: 233pt; border-bottom: windowtext 0.5pt solid; background-color: transparent" width="310"><font face="QS Qゴ゗?>SELECT NEXTVAL('A_TABLE_SEQUENCE')<br /> FROM<span style="mso-spacerun: yes">   </span>DUAL</font></td> </tr> <tr style="height: 34.5pt; mso-height-source: userset" height="46"> <td class="xl46" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext 0.5pt solid; border-bottom: black 0.5pt solid; height: 103.5pt; background-color: silver" height="138" rowspan="2" x:num=""><strong><font face="QS Qゴ゗? size="2">3</font></strong></td> <td class="xl22" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext 0.5pt solid; border-bottom: windowtext 0.5pt solid; background-color: transparent" rowspan="2"><font face="QS Qゴ゗?>ROWNUM</font></td> <td class="xl39" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 230pt; border-bottom: windowtext 0.5pt dotted; background-color: transparent" width="306"><font face="QS Qゴ゗?>①SELECT * <br /> FROM<span style="mso-spacerun: yes">  </span>AGE_TYPE <br /> WHERE ROWNUM<=5</font></td> <td class="xl39" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 233pt; border-bottom: windowtext 0.5pt dotted; background-color: transparent" width="310"><font face="QS Qゴ゗?>①SELECT * <br /> FROM AGE_TYPE <br /> LIMIT 5 OFFSET 0</font></td> </tr> <tr style="height: 69pt; mso-height-source: userset" height="92"> <td class="xl32" style="border-right: windowtext 0.5pt solid; border-top: #ece9d8; border-left: windowtext; width: 230pt; border-bottom: #ece9d8; height: 69pt; background-color: transparent" width="306" height="92"><font face="QS Qゴ゗?>②SELECT * <br /> FROM AGE_TYPE<br /> WHERE CODE IS NOT NULL<br /> AND ROWNUM<=5 <br /> ORDER BY CODE DESC</font></td> <td class="xl32" style="border-right: windowtext 0.5pt solid; border-top: #ece9d8; border-left: windowtext; width: 233pt; border-bottom: #ece9d8; background-color: transparent" width="310"><font face="QS Qゴ゗?>②SELECT<span style="mso-spacerun: yes">  </span>*<br /> FROM <br /> AGE_TYPE<br /> WHERE CODE IS NOT NULL<br /> ORDER BY CODE DESC<br /> LIMIT 5 OFFSET 0</font></td> </tr> <tr style="height: 57pt; mso-height-source: userset" height="76"> <td class="xl38" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext 0.5pt solid; border-bottom: windowtext 0.5pt solid; height: 267pt; background-color: silver" height="356" rowspan="4" x:num=""><strong><font face="QS Qゴ゗? size="2">4</font></strong></td> <td class="xl22" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext 0.5pt solid; border-bottom: windowtext 0.5pt solid; background-color: transparent" rowspan="4"><font face="QS Qゴ゗?>(+)</font></td> <td class="xl39" style="border-right: windowtext 0.5pt solid; border-top: windowtext 0.5pt solid; border-left: windowtext; width: 230pt; border-bottom: windowtext 0.5pt dotted; background-color: transparent" width="306"><font face="QS Qゴ゗?>①SELECT *<br /> FROM A_TABLE A , B_TABLE B <br /> WHERE A.ID(+)=B.ID</font></td> <td class="xl39" style="border-right: windowtext 0.5pt solid; border-top: windowtext 0.5pt solid; border-left: windowtext; width: 233pt; border-bottom: windowtext 0.5pt dotted; background-color: transparent" width="310"><font face="QS Qゴ゗?>①SELECT * <br /> FROM A_TABLE A <br /> RIGHT OUTER JOIN <br /> B_TABLE B <br /> ON A.ID=B.ID</font></td> </tr> <tr style="height: 48pt; mso-height-source: userset" height="64"> <td class="xl40" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 230pt; border-bottom: windowtext 0.5pt dotted; height: 48pt; background-color: transparent" width="306" height="64"><font face="QS Qゴ゗?>②SELECT *<br /> FROM A_TABLE A , B_TABLE B <br /> WHERE A.ID(+)=B.ID<br /> AND A.COL1='COL1_VALUE'</font></td> <td class="xl40" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 233pt; border-bottom: windowtext 0.5pt dotted; background-color: transparent" width="310"><font face="QS Qゴ゗?>②SELECT * <br /> FROM A_TABLE A <br /> RIGHT OUTER JOIN B_TABLE B <br /> ON A.ID=B.ID AND A.COL1='COL1_VALUE'</font></td> </tr> <tr style="height: 80.25pt; mso-height-source: userset" height="107"> <td class="xl40" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 230pt; border-bottom: windowtext 0.5pt dotted; height: 80.25pt; background-color: transparent" width="306" height="107"><font face="QS Qゴ゗?>③SELECT *<br /> FROM A_TABLE A, B_TABLE B,C_TABLE C,D_TABLE D<br /> WHERE <br /> A.ID=B.ID(+) AND <br /> A.ID=C.ID(+) AND<br /> A.COL1=D.COL1</font></td> <td class="xl40" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 233pt; border-bottom: windowtext 0.5pt dotted; background-color: transparent" width="310"><font face="QS Qゴ゗?>③SELECT * <br /> FROM (A_TABLE A<br /> LEFT OUTER JOIN B_TABLE B<br /> ON A.ID=B.ID) <br /> LEFT OUTER JOIN C_TABLE C<br /> ON A.ID=C.ID,D_TABLE D<br /> WHERE A.COL1=D.COL1</font></td> </tr> <tr style="height: 81.75pt; mso-height-source: userset" height="109"> <td class="xl41" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 230pt; border-bottom: windowtext 0.5pt solid; height: 81.75pt; background-color: transparent" width="306" height="109"><font face="QS Qゴ゗?>?!!<br /> SELECT * <br /> FROM A_TABLE A<br /> WHERE A.COL1(+)=0 AND<br /> <span style="mso-spacerun: yes"> </span>A.COL2(+) ='A_VALUE2'</font></td> <td class="xl41" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 233pt; border-bottom: windowtext 0.5pt solid; background-color: transparent" width="310"><font face="QS Qゴ゗?>?!!<br /> SELECT * <br /> FROM A_TABLE A<br /> WHERE A.COL1=0 AND<br /> <span style="mso-spacerun: yes"> </span>A.COL2='A_VALUE2'<br /> </font><font class="font8" face="QS Qゴ゗? color="#ff0000"><s><em>WHERE (A.COL1=0 OR A.COL1 IS NULL) AND<br /> <span style="mso-spacerun: yes"> </span>(A.COL2='A_VALUE2' OR A.COL2 IS NULL)</em></s></font></td> </tr> <tr style="height: 36pt; mso-height-source: userset" height="48"> <td class="xl38" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext 0.5pt solid; border-bottom: windowtext 0.5pt solid; height: 36pt; background-color: silver" height="48" x:num=""><strong><font face="QS Qゴ゗? size="2">5</font></strong></td> <td class="xl22" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; border-bottom: windowtext 0.5pt solid; background-color: transparent"><font face="QS Qゴ゗?>AS</font></td> <td class="xl31" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 230pt; border-bottom: windowtext 0.5pt solid; background-color: transparent" width="306"><font face="QS Qゴ゗?>SELECT A.COL1<span style="mso-spacerun: yes">  </span>A_COL1,<br /> <span style="mso-spacerun: yes">           </span>A.COL2<span style="mso-spacerun: yes">  </span>A_COL2<br /> FROM A_TABLE A</font></td> <td class="xl31" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 233pt; border-bottom: windowtext 0.5pt solid; background-color: transparent" width="310"><font face="QS Qゴ゗?>SELECT A.COL1 AS A_COL1,<br /> <span style="mso-spacerun: yes">           </span>A.COL2 AS A_COL2<br /> FROM A_TABLE A</font></td> </tr> <tr style="height: 48pt; mso-height-source: userset" height="64"> <td class="xl38" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext 0.5pt solid; border-bottom: windowtext 0.5pt solid; height: 48pt; background-color: silver" height="64" x:num=""><strong><font face="QS Qゴ゗? size="2">6</font></strong></td> <td class="xl22" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; border-bottom: windowtext 0.5pt solid; background-color: transparent"><font face="QS Qゴ゗?>NVL</font></td> <td class="xl32" style="border-right: windowtext 0.5pt solid; border-top: #ece9d8; border-left: windowtext; width: 230pt; border-bottom: #ece9d8; background-color: transparent" width="306" x:str="SELECT NVL(SUM(VALUE11),0) FS_VALUE1, NVL(SUM(VALUE21),0) FS_VALUE2FROM FIELD_SUM "><font face="QS Qゴ゗?>SELECT NVL(SUM(VALUE11),0) FS_VALUE1,<br /> <span style="mso-spacerun: yes">            </span>NVL(SUM(VALUE21),0) FS_VALUE2<br /> FROM<span style="mso-spacerun: yes">   </span>FIELD_SUM<span style="mso-spacerun: yes"> </span></font></td> <td class="xl32" style="border-right: windowtext 0.5pt solid; border-top: #ece9d8; border-left: windowtext; width: 233pt; border-bottom: #ece9d8; background-color: transparent" width="310" x:str="SELECT COALESCE(SUM(VALUE11),0) AS FS_VALUE1, COALESCE(SUM(VALUE21),0) AS FS_VALUE2FROM FIELD_SUM "><font face="QS Qゴ゗?>SELECT COALESCE(SUM(VALUE11),0) AS FS_VALUE1,<br /> <span style="mso-spacerun: yes">           </span>COALESCE(SUM(VALUE21),0) AS FS_VALUE2<br /> FROM<span style="mso-spacerun: yes">   </span>FIELD_SUM<span style="mso-spacerun: yes"> </span></font></td> </tr> <tr style="height: 51.75pt; mso-height-source: userset" height="69"> <td class="xl38" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext 0.5pt solid; border-bottom: windowtext 0.5pt solid; height: 51.75pt; background-color: silver" height="69" x:num=""><strong><font face="QS Qゴ゗? size="2">7</font></strong></td> <td class="xl26" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 40pt; border-bottom: windowtext 0.5pt solid; background-color: transparent" width="53"><font face="QS Qゴ゗?>TO_<br /> NUMBER</font></td> <td class="xl31" style="border-right: windowtext 0.5pt solid; border-top: windowtext 0.5pt solid; border-left: windowtext; width: 230pt; border-bottom: windowtext 0.5pt solid; background-color: transparent" width="306"><font face="QS Qゴ゗?>SELECT COL1 <br /> FROM A_TABLE<br /> ORDER BY TO_NUMBER(COL1)</font></td> <td class="xl31" style="border-right: windowtext 0.5pt solid; border-top: windowtext 0.5pt solid; border-left: windowtext; width: 233pt; border-bottom: windowtext 0.5pt solid; background-color: transparent" width="310"><font face="QS Qゴ゗?>SELECT COL1 <br /> FROM A_TABLE<br /> ORDER BY TO_NUMBER(COL1,999999)<br /> [注:'999999' ---- 6位数</font><font class="font7" face="GB BiaoTiSong">?/font><font class="font6" face="QS Qゴ゗?>COL1字段?/font><font class="font7" face="GB BiaoTiSong">?/font><font class="font6" face="QS Qゴ゗?>度]</font></td> </tr> <tr style="height: 66pt; mso-height-source: userset" height="88"> <td class="xl38" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext 0.5pt solid; border-bottom: windowtext 0.5pt solid; height: 66pt; background-color: silver" height="88" x:num=""><strong><font face="QS Qゴ゗? size="2">8</font></strong></td> <td class="xl22" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; border-bottom: windowtext 0.5pt solid; background-color: transparent"><font face="QS Qゴ゗?>DECODE</font></td> <td class="xl31" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 230pt; border-bottom: windowtext 0.5pt solid; background-color: transparent" width="306"><font face="QS Qゴ゗?>SELECT DECODE(ENDFLAG,'1','A','B') ENDFLAG<br /> FROM<span style="mso-spacerun: yes">  </span>TEST</font></td> <td class="xl31" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 233pt; border-bottom: windowtext 0.5pt solid; background-color: transparent" width="310"><font face="QS Qゴ゗?>SELECT <br /> (CASE ENDFLAG <br /> WHEN '1' THEN 'A'<br /> ELSE '</font><font class="font9" face="BIG5 Gothic">B</font><font class="font6" face="QS Qゴ゗?>' END) AS ENDFLAG<br /> FROM TEST</font></td> </tr> <tr style="height: 79.5pt; mso-height-source: userset" height="106"> <td class="xl46" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext 0.5pt solid; border-bottom: black 0.5pt solid; height: 210.75pt; background-color: silver" height="281" rowspan="4" x:num=""><strong><font face="QS Qゴ゗? size="2">9</font></strong></td> <td class="xl43" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext 0.5pt solid; width: 40pt; border-bottom: black 0.5pt solid; background-color: transparent" width="53" rowspan="4"><font face="GB BiaoTiSong">旉<br /> 问题</font></td> <td class="xl39" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 230pt; border-bottom: windowtext 0.5pt dotted; background-color: transparent" width="306"><font face="QS Qゴ゗?>UPDATE A_TABLE<br /> SET ENTREDATE=SYSDATE</font></td> <td class="xl39" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 233pt; border-bottom: windowtext 0.5pt dotted; background-color: transparent" width="310"><font face="QS Qゴ゗?>UPDATE A_TABLE<br /> SET ENTREDATE=TO_TIMESTAMP(CURRENT_TIMESTAMP,'YYYY-MM-DD HH24:MI:SS')<br /> 或?br /> UPDATE A_TABLE<br /> SET ENTREDATE=CURRENT_TIMESTAMP</font></td> </tr> <tr style="height: 57pt; mso-height-source: userset" height="76"> <td class="xl40" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 230pt; border-bottom: windowtext 0.5pt dotted; height: 57pt; background-color: transparent" width="306" height="76"><font face="QS Qゴ゗?>SELECT TO_DATE('20010203','YYYY-MM-DD') AS DAY<br /> FROM DUAL</font></td> <td class="xl40" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 233pt; border-bottom: windowtext 0.5pt dotted; background-color: transparent" width="310"><font face="QS Qゴ゗?>SELECT TO_DATE('20010203','YYYYMMDD') AS DAY<br /> FROM DUAL</font><font class="font8"><s><br /> <em><font face="QS Qゴ゗? color="#ff0000">SELECT TO_DATE('20010203','YYYY-MM-DD') AS DAY<br /> FROM DUAL</font></em></s></font></td> </tr> <tr style="height: 36pt; mso-height-source: userset" height="48"> <td class="xl40" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 230pt; border-bottom: windowtext 0.5pt dotted; height: 36pt; background-color: transparent" width="306" height="48"><font face="QS Qゴ゗?>SELECT TO_DATE(SYSDATE,'YYYY-MM-DD') AS DAY<br /> FROM DUAL</font></td> <td class="xl40" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 233pt; border-bottom: windowtext 0.5pt dotted; background-color: transparent" width="310"><font face="QS Qゴ゗?>SELECT TO_DATE(CURRENT_DATE,'YYYY-MM-DD') AS DAY<br /> FROM DUAL</font></td> </tr> <tr style="height: 38.25pt; mso-height-source: userset" height="51"> <td class="xl41" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 230pt; border-bottom: windowtext 0.5pt solid; height: 38.25pt; background-color: transparent" width="306" height="51"><font face="QS Qゴ゗?>SELECT TO_DATE(SYSDATE,'YYYY/MM/DD') AS DAY<br /> FROM DUAL</font></td> <td class="xl41" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 233pt; border-bottom: windowtext 0.5pt solid; background-color: transparent" width="310"><font face="QS Qゴ゗?>SELECT TO_DATE(CURRENT_DATE,'YYYY/MM/DD') AS DAY<br /> FROM DUAL</font></td> </tr> <tr style="height: 63pt; mso-height-source: userset" height="84"> <td class="xl38" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext 0.5pt solid; border-bottom: windowtext 0.5pt solid; height: 63pt; background-color: silver" height="84" x:num=""><strong><font face="QS Qゴ゗? size="2">10</font></strong></td> <td class="xl22" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; border-bottom: windowtext 0.5pt solid; background-color: transparent"><font face="QS Qゴ゗?>||</font></td> <td class="xl32" style="border-right: windowtext 0.5pt solid; border-top: #ece9d8; border-left: windowtext; width: 230pt; border-bottom: #ece9d8; background-color: transparent" width="306"><font face="QS Qゴ゗?>SELECT NULL||'-'||NULL AS VALUES1<br /> FROM DUAL<br /> </font></td> <td class="xl32" style="border-right: windowtext 0.5pt solid; border-top: #ece9d8; border-left: windowtext; width: 233pt; border-bottom: #ece9d8; background-color: transparent" width="310"><font face="QS Qゴ゗?>SELECT COALESCE(NULL,'')||'-'||COALESCE(NULL,'') AS VALUES1<br /> FROM DUAL<br /> </font><font class="font8" face="QS Qゴ゗? color="#ff0000"><s><em>SELECT NULL||'-' ||NULL AS VALUES1<br /> FROM DUAL</em></s></font></td> </tr> <tr style="height: 89.25pt; mso-height-source: userset" height="119"> <td class="xl38" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext 0.5pt solid; border-bottom: windowtext 0.5pt solid; height: 89.25pt; background-color: silver" height="119" x:num=""><strong><font face="QS Qゴ゗? size="2">11</font></strong></td> <td class="xl22" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; border-bottom: windowtext 0.5pt solid; background-color: transparent"><font face="QS Qゴ゗?>aggregate</font></td> <td class="xl31" style="border-right: windowtext 0.5pt solid; border-top: windowtext 0.5pt solid; border-left: windowtext; width: 230pt; border-bottom: windowtext 0.5pt solid; background-color: transparent" width="306"><font face="QS Qゴ゗?>SELECT ROUND(AVG(SUM(BASICCNT1))) BASICCNT<br /> FROM<span style="mso-spacerun: yes">   </span>ACCESS_INFO_SUM1_V<br /> WHERE YEARCODE BETWEEN '200305' AND '200505'<br /> GROUP BY SCCODE</font></td> <td class="xl31" style="border-right: windowtext 0.5pt solid; border-top: windowtext 0.5pt solid; border-left: windowtext; width: 233pt; border-bottom: windowtext 0.5pt solid; background-color: transparent" width="310"><font face="QS Qゴ゗?>SELECT<span style="mso-spacerun: yes">  </span>ROUND(AVG(AIV.BASICCNT)) AS BASICCNT<br /> FROM<br /> <span style="mso-spacerun: yes">    </span>(SELECT SUM(BASICCNT1)<span style="mso-spacerun: yes">      </span>AS BASICCNT<br /> <span style="mso-spacerun: yes">    </span>FROM<span style="mso-spacerun: yes">   </span>ACCESS_INFO_SUM1_V<br /> <span style="mso-spacerun: yes">    </span>WHERE YEARCODE BETWEEN '200305' AND '200505'<br /> <span style="mso-spacerun: yes">    </span>GROUP BY sccode<br /> <span style="mso-spacerun: yes">     </span>) AIV</font></td> </tr> <tr style="height: 26.25pt; mso-height-source: userset" height="35"> <td class="xl38" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext 0.5pt solid; border-bottom: windowtext 0.5pt solid; height: 219.75pt; background-color: silver" height="293" rowspan="6" x:num=""><strong><font face="QS Qゴ゗? size="2">12</font></strong></td> <td class="xl22" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext 0.5pt solid; border-bottom: windowtext 0.5pt solid; background-color: transparent" rowspan="6"><font face="QS Qゴ゗?>??/font></td> <td class="xl39" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 230pt; border-bottom: windowtext 0.5pt dotted; background-color: transparent" width="306"><font face="QS Qゴ゗?>①SELECT LENGTH('') AS VALUE1 FROM DUAL<br /> [Result]VALUE1=NULL</font></td> <td class="xl39" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 233pt; border-bottom: windowtext 0.5pt dotted; background-color: transparent" width="310"><font face="QS Qゴ゗?>①SELECT LENGTH('') AS VALUE1 FROM DUAL<br /> [Result]VALUE1=0</font></td> </tr> <tr style="height: 37.5pt; mso-height-source: userset" height="50"> <td class="xl40" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 230pt; border-bottom: windowtext 0.5pt dotted; height: 37.5pt; background-color: transparent" width="306" height="50"><font face="QS Qゴ゗?>②SELECT TO_DATE('','YYYYMMDD') AS VALUE2 <br /> FROM DUAL<br /> [Result]VALUE2=NULL</font></td> <td class="xl40" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 233pt; border-bottom: windowtext 0.5pt dotted; background-color: transparent" width="310"><font face="QS Qゴ゗?>②SELECT TO_DATE('','YYYYMMDD') AS VALUE2 <br /> FROM DUAL<br /> [Result]VALUE2=0001-01-01 BC</font></td> </tr> <tr style="height: 27.75pt; mso-height-source: userset" height="37"> <td class="xl40" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 230pt; border-bottom: windowtext 0.5pt dotted; height: 27.75pt; background-color: transparent" width="306" height="37"><font face="QS Qゴ゗?>③SELECT TO_NUMBER('',1) AS VALUE3 FROM DUAL<br /> [Result]VALUE3=NULL</font></td> <td class="xl40" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 233pt; border-bottom: windowtext 0.5pt dotted; background-color: transparent" width="310"><font face="QS Qゴ゗?>③SELECT TO_NUMBER('',1) AS VALUE3 FROM DUAL<br /> [Result]不能</font><font class="font7" face="GB BiaoTiSong">?/font><font class="font6" face="QS Qゴ゗?>?/font></td> </tr> <tr style="height: 39pt; mso-height-source: userset" height="52"> <td class="xl40" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 230pt; border-bottom: windowtext 0.5pt dotted; height: 39pt; background-color: transparent" width="306" height="52"><font face="QS Qゴ゗?>④INSERT INTO TEST(VALUE4)VALUES('')<br /> [Result]VALUE4=NULL (注:VALUE3字段</font><font class="font7" face="GB BiaoTiSong">?/font><font class="font6" face="QS Qゴ゗?>?/font><font class="font9" face="BIG5 Gothic">?/font><font class="font7" face="GB BiaoTiSong">c?/font><font class="font6" face="QS Qゴ゗?>?</font></td> <td class="xl40" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 233pt; border-bottom: windowtext 0.5pt dotted; background-color: transparent" width="310"><font face="QS Qゴ゗?>④INSERT INTO TEST(VALUE4)VALUES('')<br /> [Result]VALUE4=0<br /> <span style="mso-spacerun: yes"> </span>(注:VALUE4字段</font><font class="font7" face="GB BiaoTiSong">?/font><font class="font6" face="QS Qゴ゗?>?/font><font class="font9" face="BIG5 Gothic">?/font><font class="font7" face="GB BiaoTiSong">c?/font><font class="font6" face="QS Qゴ゗?>?</font></td> </tr> <tr style="height: 39.75pt; mso-height-source: userset" height="53"> <td class="xl40" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 230pt; border-bottom: windowtext 0.5pt dotted; height: 39.75pt; background-color: transparent" width="306" height="53"><font face="QS Qゴ゗?>⑤INSERT INTO TEST(VALUE5)VALUES('')<br /> [Result]VALUE5=NULL (注:VALUE5字段</font><font class="font7" face="GB BiaoTiSong">?/font><font class="font6" face="QS Qゴ゗?>字符</font><font class="font7" face="GB BiaoTiSong">c?/font><font class="font6" face="QS Qゴ゗?>?</font></td> <td class="xl40" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 233pt; border-bottom: windowtext 0.5pt dotted; background-color: transparent" width="310"><font face="QS Qゴ゗?>⑤INSERT INTO TEST(VALUE5)VALUES('')<br /> [Result]VALUE5=''<br /> <span style="mso-spacerun: yes"> </span>(注:VALUE5字段</font><font class="font7" face="GB BiaoTiSong">?/font><font class="font6" face="QS Qゴ゗?>字符</font><font class="font7" face="GB BiaoTiSong">c?/font><font class="font6" face="QS Qゴ゗?>?</font><font class="font7" face="GB BiaoTiSong">l果为长度ؓ零的字符?/font><font class="font6" face="QS Qゴ゗?>)</font></td> </tr> <tr style="height: 49.5pt; mso-height-source: userset" height="66"> <td class="xl41" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 230pt; border-bottom: windowtext 0.5pt solid; height: 49.5pt; background-color: transparent" width="306" height="66"><font face="QS Qゴ゗?>⑥INSERT INTO TEST(VALUE6)VALUES(TO_DATE('','YYYYMMDD'))<br /> [Result]VALUE6=NULL (注:VALUE6字段</font><font class="font7" face="GB BiaoTiSong">为时间类</font><font class="font6" face="QS Qゴ゗?>?</font></td> <td class="xl41" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 233pt; border-bottom: windowtext 0.5pt solid; background-color: transparent" width="310"><font face="QS Qゴ゗?>⑥INSERT INTO TEST(VALUE6)VALUES(TO_DATE('','YYYYMMDD'))<br /> [Result]VALUE6=0001-01-01 BC<br /> <span style="mso-spacerun: yes"> </span>(注:VALUE7字段</font><font class="font7" face="GB BiaoTiSong">为时间类</font><font class="font6" face="QS Qゴ゗?>?</font></td> </tr> <tr style="height: 68.25pt; mso-height-source: userset" height="91"> <td class="xl38" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext 0.5pt solid; border-bottom: windowtext 0.5pt solid; height: 68.25pt; background-color: silver" height="91" x:num=""><strong><font face="QS Qゴ゗? size="2">13</font></strong></td> <td class="xl22" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; border-bottom: windowtext 0.5pt solid; background-color: transparent"><font face="QS Qゴ゗?>CEIL</font></td> <td class="xl31" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 230pt; border-bottom: windowtext 0.5pt solid; background-color: transparent" width="306"><font face="QS Qゴ゗?>SELECT CEIL(SYSDATE - TO_DATE('20051027 14:56:10','YYYYMMDD HH24:MI:SS')) AS DAYS<br /> FROM DUAL</font></td> <td class="xl31" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 233pt; border-bottom: windowtext 0.5pt solid; background-color: transparent" width="310"><font face="QS Qゴ゗?>SELECT <br /> EXTRACT(DAY FROM (TO_TIMESTAMP(CURRENT_TIMESTAMP,'YYYY-MM-DD-HH24-MI-SS') -TO_TIMESTAMP('2005-10-27 14:56:10','YYYY-MM-DD-HH24-MI-SS') ))+1 AS DAYS<br /> FROM DUAL</font></td> </tr> <tr style="height: 36.75pt; mso-height-source: userset" height="49"> <td class="xl38" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext 0.5pt solid; border-bottom: windowtext 0.5pt solid; height: 36.75pt; background-color: silver" height="49" x:num=""><strong><font face="QS Qゴ゗? size="2">14</font></strong></td> <td class="xl22" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; border-bottom: windowtext 0.5pt solid; background-color: transparent"><font face="QS Qゴ゗?>NULLIF</font></td> <td class="xl27" style="border-right: windowtext 0.5pt solid; border-top: #ece9d8; border-left: windowtext; border-bottom: windowtext 0.5pt solid; background-color: transparent"><font face="QS Qゴ゗?>无NULLIF函数</font></td> <td class="xl30" style="border-right: windowtext 0.5pt solid; border-top: #ece9d8; border-left: windowtext; width: 233pt; border-bottom: windowtext 0.5pt solid; background-color: transparent" width="310"><font face="QS Qゴ゗?>SELECT NULLIF(VALUE1,VALUE2) AS COL1 FROM DUAL<br /> [注]当VALUE1=VALUE2</font><font class="font7" face="GB BiaoTiSong">ӞCOL1=NULL</font></td> </tr> <tr style="height: 55.5pt; mso-height-source: userset" height="74"> <td class="xl38" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext 0.5pt solid; border-bottom: windowtext 0.5pt solid; height: 55.5pt; background-color: silver" height="74" x:num=""><strong><font face="QS Qゴ゗? size="2">15</font></strong></td> <td class="xl22" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; border-bottom: windowtext 0.5pt solid; background-color: transparent"><font face="QS Qゴ゗?>CONCAT</font></td> <td class="xl31" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 230pt; border-bottom: windowtext 0.5pt solid; background-color: transparent" width="306"><font face="QS Qゴ゗?>CONCAT(CHAR,CHAR)</font></td> <td class="xl42" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 233pt; border-bottom: windowtext 0.5pt solid; background-color: transparent" width="310"><font face="GB BiaoTiSong">创徏函数来解?/font><font class="font6"><br /> <font face="QS Qゴ゗?>CREATE FUNCTION CONCAT(CHAR,CHAR)<br /> RETURNS CHAR AS <br /> <span style="mso-spacerun: yes">        </span>'SELECT $1 || $2' LANGUAGE 'sql';</font></font></td> </tr> <tr style="height: 59.25pt; mso-height-source: userset" height="79"> <td class="xl38" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext 0.5pt solid; border-bottom: windowtext 0.5pt solid; height: 59.25pt; background-color: silver" height="79" x:num=""><strong><font face="QS Qゴ゗? size="2">16</font></strong></td> <td class="xl26" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 40pt; border-bottom: windowtext 0.5pt solid; background-color: transparent" width="53"><font face="QS Qゴ゗?>ADD_<br /> MONTHS</font></td> <td class="xl31" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 230pt; border-bottom: windowtext 0.5pt solid; background-color: transparent" width="306"><font face="QS Qゴ゗?>add_months(date, int)</font></td> <td class="xl42" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 233pt; border-bottom: windowtext 0.5pt solid; background-color: transparent" width="310"><font face="GB BiaoTiSong">?/font><font class="font6" face="QS Qゴ゗?>建函数来解决<br /> CREATE FUNCTION add_months(date, int) <br /> RETURNS date AS <br /> 'SELECT ($1 + ( $2::text || ''months'')::interval)::date;' <br /> LANGUAGE 'sql'</font></td> </tr> <tr style="height: 70.5pt; mso-height-source: userset" height="94"> <td class="xl38" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext 0.5pt solid; border-bottom: windowtext 0.5pt solid; height: 70.5pt; background-color: silver" height="94" x:num=""><strong><font face="QS Qゴ゗? size="2">17</font></strong></td> <td class="xl26" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 40pt; border-bottom: windowtext 0.5pt solid; background-color: transparent" width="53"><font face="QS Qゴ゗?>LAST<br /> _DAY</font></td> <td class="xl30" style="border-right: windowtext 0.5pt solid; border-top: #ece9d8; border-left: windowtext; width: 230pt; border-bottom: windowtext 0.5pt solid; background-color: transparent" width="306"><font face="QS Qゴ゗?>LAST_DAY(DATE)</font></td> <td class="xl35" style="border-right: windowtext 0.5pt solid; border-top: #ece9d8; border-left: windowtext; width: 233pt; border-bottom: windowtext 0.5pt solid; background-color: transparent" width="310"><font face="GB BiaoTiSong">?/font><font class="font6" face="QS Qゴ゗?>建函数来解决<br /> CREATE FUNCTION LAST_DAY(DATE)<br /> RETURNS DATE AS<br /> <span style="mso-spacerun: yes">        </span>'SELECT date(substr(text($1 + <br /> <span style="mso-spacerun: yes">                </span>interval(''1 month'')),1,7)||''-01'')-1'<br /> <span style="mso-spacerun: yes">        </span>LANGUAGE 'sql';</font></td> </tr> <tr style="height: 71.25pt; mso-height-source: userset" height="95"> <td class="xl38" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext 0.5pt solid; border-bottom: windowtext 0.5pt solid; height: 71.25pt; background-color: silver" height="95" x:num=""><strong><font face="QS Qゴ゗? size="2">18</font></strong></td> <td class="xl26" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 40pt; border-bottom: windowtext 0.5pt solid; background-color: transparent" width="53"><font face="QS Qゴ゗?>MONTHS<br /> _BETWEEN</font></td> <td class="xl30" style="border-right: windowtext 0.5pt solid; border-top: #ece9d8; border-left: windowtext; width: 230pt; border-bottom: windowtext 0.5pt solid; background-color: transparent" width="306"><font face="QS Qゴ゗?>MONTH_BETWEEN(DATA,DATA)</font></td> <td class="xl35" style="border-right: windowtext 0.5pt solid; border-top: #ece9d8; border-left: windowtext; width: 233pt; border-bottom: windowtext 0.5pt solid; background-color: transparent" width="310"><font face="GB BiaoTiSong">?/font><font class="font6" face="QS Qゴ゗?>建函数来解决<br /> CREATE FUNCTION MONTH_BETWEEN(DATA,DATA)<br /> RETURNS NUMERIC AS<br /> <span style="mso-spacerun: yes">        </span>'SELECT to_number((date($1)-<br /> <span style="mso-spacerun: yes">                           </span>date($2)),''999999999'')/31'<br /> <span style="mso-spacerun: yes">        </span>LANGUAGE 'sql';</font></td> </tr> <tr style="height: 234pt; mso-height-source: userset" height="312"> <td class="xl38" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext 0.5pt solid; border-bottom: windowtext 0.5pt solid; height: 234pt; background-color: silver" height="312" x:num=""><strong><font face="QS Qゴ゗? size="2">19</font></strong></td> <td class="xl26" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 40pt; border-bottom: windowtext 0.5pt solid; background-color: transparent" width="53"><font face="QS Qゴ゗?>GRE~<br /> ATEST</font></td> <td class="xl30" style="border-right: windowtext 0.5pt solid; border-top: #ece9d8; border-left: windowtext; width: 230pt; border-bottom: windowtext 0.5pt solid; background-color: transparent" width="306"><font face="QS Qゴ゗?>GREATEST (LEAST)</font></td> <td class="xl35" style="border-right: windowtext 0.5pt solid; border-top: #ece9d8; border-left: windowtext; width: 233pt; border-bottom: windowtext 0.5pt solid; background-color: transparent" width="310"><font face="GB BiaoTiSong">?/font><font class="font6" face="QS Qゴ゗?>建函数来解决<br /> CREATE OR REPLACE FUNCTION<br /> <span style="mso-spacerun: yes">   </span>GREATEST(TEXT[]) RETURNS TEXT AS ' <br /> DECLARE <br /> <span style="mso-spacerun: yes">   </span>ARRY ALIAS FOR $1;<br /> <span style="mso-spacerun: yes">   </span>GREATEST TEXT;<br /> BEGIN<br /> <span style="mso-spacerun: yes">   </span>GREATEST := ARRY[1];<br /> <span style="mso-spacerun: yes">   </span>FOR I IN 1 .. ARRAY_UPPER(ARRY,1) LOOP<br /> <span style="mso-spacerun: yes">      </span>IF ARRY[I] > GREATEST THEN<br /> <span style="mso-spacerun: yes">        </span>GREATEST := ARRY[I];<br /> <span style="mso-spacerun: yes">      </span>END IF;<br /> <span style="mso-spacerun: yes">   </span>END LOOP;<br /> <span style="mso-spacerun: yes">   </span>RETURN GREATEST;<br /> END;<br /> ' LANGUAGE 'PLPGSQL';<br /> <br /> SELECT GREATEST( ARRAY['HARRY','HARRIOT','HAROLD'])<br /> AS "Greatest";</font></td> </tr> <tr style="height: 16.5pt; mso-height-source: userset" height="22"> <td class="xl38" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext 0.5pt solid; border-bottom: windowtext 0.5pt solid; height: 16.5pt; background-color: silver" height="22" x:num=""><strong><font face="QS Qゴ゗? size="2">20</font></strong></td> <td class="xl22" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; border-bottom: windowtext 0.5pt solid; background-color: transparent"><font face="QS Qゴ゗?>BITAND</font></td> <td class="xl33" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; border-bottom: windowtext 0.5pt solid; background-color: transparent"><font face="QS Qゴ゗?>BITAND(int,int)</font></td> <td class="xl30" style="border-right: windowtext 0.5pt solid; border-top: #ece9d8; border-left: windowtext; width: 233pt; border-bottom: windowtext 0.5pt solid; background-color: transparent" width="310"><font face="QS Qゴ゗?>SELECT ?& ?</font></td> </tr> <tr style="height: 30pt; mso-height-source: userset" height="40"> <td class="xl38" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext 0.5pt solid; border-bottom: windowtext 0.5pt solid; height: 30pt; background-color: silver" height="40" x:num=""><strong><font face="QS Qゴ゗? size="2">21</font></strong></td> <td class="xl22" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; border-bottom: windowtext 0.5pt solid; background-color: transparent"><font face="QS Qゴ゗?>子条?/font></td> <td class="xl34" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 230pt; border-bottom: windowtext 0.5pt solid; background-color: transparent" width="306"><font face="QS Qゴ゗?> </font></td> <td class="xl31" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 233pt; border-bottom: windowtext 0.5pt solid; background-color: transparent" width="310"><font face="QS Qゴ゗?>在FROM子条件中字段</font><font class="font7" face="GB BiaoTiSong">L列名Q?br /> 处理Ҏ用AS +别名</font></td> </tr> <tr style="height: 20.25pt; mso-height-source: userset" height="27"> <td class="xl38" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext 0.5pt solid; border-bottom: windowtext 0.5pt solid; height: 20.25pt; background-color: silver" height="27" x:num=""><strong><font face="QS Qゴ゗? size="2">22</font></strong></td> <td class="xl22" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; border-bottom: windowtext 0.5pt solid; background-color: transparent"><font face="QS Qゴ゗?>MINUS</font></td> <td class="xl33" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; border-bottom: windowtext 0.5pt solid; background-color: transparent"><font face="QS Qゴ゗?>MINUS</font></td> <td class="xl31" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 233pt; border-bottom: windowtext 0.5pt solid; background-color: transparent" width="310"><font face="QS Qゴ゗?>以EXCEPT来替?/font></td> </tr> <tr style="height: 36pt; mso-height-source: userset" height="48"> <td class="xl38" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext 0.5pt solid; border-bottom: windowtext 0.5pt solid; height: 36pt; background-color: silver" height="48" x:num=""><strong><font face="QS Qゴ゗? size="2">23</font></strong></td> <td class="xl26" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 40pt; border-bottom: windowtext 0.5pt solid; background-color: transparent" width="53"><font face="QS Qゴ゗?>BIN_<br /> TO_<br /> NUM</font></td> <td class="xl33" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; border-bottom: windowtext 0.5pt solid; background-color: transparent"><font face="QS Qゴ゗?>SELECT BIN_TO_NUM(1,0,1,0) AS VALUE1 FROM DUAL</font></td> <td class="xl31" style="border-right: windowtext 0.5pt solid; border-top: windowtext; border-left: windowtext; width: 233pt; border-bottom: windowtext 0.5pt solid; background-color: transparent" width="310"><font face="QS Qゴ゗?>SELECT CAST(B'1010' AS INTEGER) AS VALUE1</font></td> </tr> </tbody> </table> <img src ="http://www.aygfsteel.com/kingeleven/aggbug/172487.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/kingeleven/" target="_blank">vv</a> 2008-01-03 14:56 <a href="http://www.aygfsteel.com/kingeleven/articles/172487.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>oracle数据cdhttp://www.aygfsteel.com/kingeleven/articles/170253.htmlvvvvTue, 25 Dec 2007 03:04:00 GMThttp://www.aygfsteel.com/kingeleven/articles/170253.htmlhttp://www.aygfsteel.com/kingeleven/comments/170253.htmlhttp://www.aygfsteel.com/kingeleven/articles/170253.html#Feedback0http://www.aygfsteel.com/kingeleven/comments/commentRss/170253.htmlhttp://www.aygfsteel.com/kingeleven/services/trackbacks/170253.html    
  字段cd   中文说明   限制条g   其它说明    
  CHAR   固定长度字符?  最大长?000   bytes          
  VARCHAR2   可变长度的字W串   最大长?000   bytes     可做索引的最大长?49    
  NCHAR   Ҏ字符集而定的固定长度字W串   最大长?000   bytes          
  NVARCHAR2   Ҏ字符集而定的可变长度字W串   最大长?000   bytes          
  DATE   日期Q日-?q_   DD-MM-YYQHH-MI-SSQ?  l过严格试Q无千虫问题    
  LONG   长字符?  最大长?GQ?31-1Q?  _存储大部头著?   
  RAW   固定长度的二q制数据   最大长?000   bytes     可存攑֤媒体图象声音{?   
  LONG   RAW   可变长度的二q制数据   最大长?G   同上    
  BLOB   二进制数?  最大长?G        
  CLOB   字符数据   最大长?G        
  NCLOB   Ҏ字符集而定的字W数?  最大长?G        
  BFILE   存放在数据库外的二进制数?  最大长?G        
  ROWID   数据表中记录的唯一行号   10   bytes   ********.****.****格式Q???    
  NROWID   二进制数据表中记录的唯一行号   最大长?000   bytes    
  NUMBER(P,S)   数字cd   P为整CQS为小C    
  DECIMAL(P,S)   数字cd   P为整CQS为小C    
  INTEGER   整数cd   的整数    
  FLOAT   点数类?  NUMBER(38)Q双_ֺ    
  REAL   实数cd   NUMBER(63)Q精度更?   
   
  q些数据cd的数字代码是多少Q? 
  如在dbf? 
  8   ----CHAR  
  12   -----NUMERIC  


vv 2007-12-25 11:04 发表评论
]]>
վ֩ģ壺 ˫| | ɽ| ½| | ͼľ| | | | | | ǿ| ˳| | | | | ǿ| | ̨| | Ϫ| ʡ| | | dz| | н| | ƾ| | ̨| ʷ| ľ| ͷ| | | | | ͨɽ| |