【正文】
e can only be used in SELECT statements. The syntax for the ORDER BY clause is: SELECT columns FROM tablesWHERE predicates ORDER BY column ASC/DESC。IBM39。 This would return all records sorted by the supplier_city field in ascending order. Example 2 SELECT supplier_city FROM supplier WHERE supplier_name = 39。 ORDER BY supplier_city DESC。 UPDATE The UPDATE statement allows you to update a single record or multiple records in a table. The syntax the UPDATE statement is: UPDATE table SET column = expression WHERE predicates INSERT The INSERT statement allows you to insert a single record or multiple records into a table. The syntax for the INSERT statement is: INSERT INTO table(column1, column2, ... columnn)VALUES(value1, value2, ... valuen) DELETE The DELETE statement allows you to delete a single record or multiple records from a tableThe syntax for the DELETE statement is: DELETE FROM table WHERE predicatespl/sql函數(shù)substr (string, [length])This function allows you to extract a substring from a stringFor Example: substr (39。, 6, 2) would return 39。 substr (39。, 6) would return 39。 substr (39。, 1, 4) would return 39。decode( expression , search , result [, search , result]... [, default] ) This function has the functionality of an IFTHENELSE statement For Example: SELECT supplier_name,decode (supplier_id, 10000,39。, 10001, 39。,10002, 39。, 39。) result FROM suppliersinstr(string1, string2, [start_position], [nth_appearance]) This function returns the location of a substring in a string For example:instr (39。, 39。) would return 2。e39。Tech on the net39。e39。 the first occurrence of 39。 instr (39。, 39。, 1, 2) would return 11。e39。Tech on the net39。e39。 the third occurrence of 39。 instr (39。, 39。, 3, 2) would return 2Trim(text) This function removes leading and trailing spaces from a string For exampleTrim ( Tech on the Net) would return Tech on the Net Trim ( Alphabet ) would return AlphabetRTrim (text)This function removes trailing spaces from a stringFor example:RTrim (Tech on the Net ) would return Tech on the Net RTrim ( Alphabet ) would return Alphabet LTrim (text) This function removes leading spaces from a string For example:LTrim ( Tech on the Net) would return Tech on the Net LTrim ( Alphabet ) would return Alphabet to_number (string1, [format_mask], [nls_language] ) This function converts a string to a number For example:to_number (39。, 39。) would return the number to_number (39。, 39。) would return the number 546 to_number (39。, 39。) would return the number 23to_char (value, [format_mask], [nls_language] ) This function converts a number or date to a string Examples Numbers The following are number examples for the to_char function.to_char (, 39。) would return 39。 to_char (, 39。) would return 39。 to_char (, 39。) would return 39。 to_char (21, 39。) would return 39。The following are date examples for the to_char function.to_char (sysdate, 39。)。2003/07/0939。Month DD, YYYY39。 would return 39。 to_char (sysdate, 39。)。July 9, 200339。MON DDth, YYYY39。 would return 39。 to_char (sysdate, 39。)。JUL 9TH, 200339。FMMon ddth, YYYY39。 would return 39。to_date (string1, [format_mask], [nls_language] ) This function converts a string to a date、nvlFor example:to_date (39。, 39。)。07090339。MMDDYY39。 would return a date value of July 9, 2003. to_date (39。, 39。)。n/a39。 row_line cur_line%Rowtype。Create or replace view ic_item_v As Select * from ic_item_mst_b 基表 是一個物理存在的表,能以表格的形式存儲數(shù)據(jù),是數(shù)據(jù)的載體 Create table table_name (col1 varchar2(100),col2 varchar2(10)) 臨時表 1 會話特有的臨時表 CREATE GLOBAL TEMPORARY TABLE_NAME (column specification ) ON COMMIT PRESERVE ROWS; 2 事務(wù)特有的臨時表 CREATE GLOBAL TEMPORARY TABLE_NAME (column specification ) ON COMMIT DELETE ROWS; CREATE GLOBAL TEMPORARY TABLE MyTempTable 所建的臨時表雖然是存在的,但是insert 一條記錄然后用別的連接登上去select,記錄是空的ON COMMIT DELETE ROWS 說明臨時表是事務(wù)指定,每次提交后ORACLE將截?cái)啾恚▌h除全部行) ON COMMIT PRESERVE ROWS 說明臨時表是會話指定,當(dāng)中斷會話時ORACLE將截?cái)啾? 異常 PL/SQL處理異常不同于其他程序語言的錯誤管理方法,PL/SQL的異常處理機(jī)制與ADA很相似,有一個處理錯誤的全包含方法。oracle允許聲明其他異常條件類型以擴(kuò)展錯誤/異常處理?! ‘?dāng)一個運(yùn)行時錯誤發(fā)生時,稱為一個異常被拋出。在PL/SQL程序設(shè)計(jì)中異常的拋出和處理是非常重要的內(nèi)容。異常也可以通過RAISE語句拋出RAISE exception_name。用HTML編寫的超文本文檔稱為HTML文檔,它能獨(dú)立于各種操作系統(tǒng)平臺(如UNIX,WINDOWS等)。HTML HEAD 頭 部 信 息 /HEAD BODY 文 檔 主 體, 正 文 部 分 /BODY/HTML 其中HTML在最外層, 表示這對標(biāo)記間的內(nèi)容是HTML文 檔。HEAD 之間包括文檔的頭部信息,如文檔總標(biāo)題等,若不需頭部信息則可省略此標(biāo)記。 2 在報(bào)表的實(shí)際過程中,最重要的是針對標(biāo)記table的應(yīng)用, 表格的基本結(jié)構(gòu) table.../table 定義表格 caption.../caption 定義標(biāo)題 tr 定義表行 th 定義表頭 td 定義表元(表格的具體數(shù)據(jù)) 表中數(shù)據(jù)左右排列方式通過align屬性來定義left、right、center 表中數(shù)據(jù)上下排列方式通過valign屬性來定義top、middle、bottom 3 跨多行、多列的表元 要創(chuàng)建跨多行、多列的表元,只需在TH或TD中加入ROWSPAN或COLSPAN屬性,這兩個屬性的值,表明了表元中要跨越的行或列的個數(shù)?!】缍嘈械谋碓?th rowspan= td rowspan= rowspan所要表示的意義是指跨越的行數(shù),例如rowspan=2就表示這一格跨越表格兩個行的高度 4 插入圖象的標(biāo)簽是IMG,其格式為: IMG SRC=圖形文件地址 SRC屬性指明了所要鏈接的圖象文件地址,這個圖形文件可以是本地機(jī)器上的圖形,也可以是位于遠(yuǎn)端主機(jī)上的圖形?! ±骸MG SRC=images/ IMG還有兩個屬性是HEIGHT和WIDTH,分別表示圖形的高和寬。更多的人把它稱作樣式表。它的基本語句的結(jié)構(gòu)是這樣的: 選擇符{屬性:屬性值}一般說來,style下面的CSS語句是以注釋語句的形式書寫的。}td {fontfamily:宋體。fontweight:normal。textalign:center。height:27。}.td_css{border:solid windowtext .5pt。border:solid windowtext .5pt。除此之外,還有一些規(guī)則,例如以TL結(jié)尾表示帶有語言信息的表,V結(jié)尾表示一般的視圖,VL表示帶有語言信息的視圖,以V$開頭代表動態(tài)性能試圖,以FND開頭是屬于Application Object Library模塊的,以AR,RA開頭是屬于Oracle Receivables模塊的,以MTL開頭是屬于庫存模塊的,以AP開頭是屬于應(yīng)收模塊的,以GL開頭是屬于總帳模塊的,以FA開頭是屬于資產(chǎn)模塊的,以O(shè)E開頭的是屬于訂單模塊的,以WSH開頭是屬于發(fā)運(yùn)模塊的,以WIP開頭是屬于在制車間模塊的,以IBE開頭是屬于網(wǎng)上商店的,etc; 而且根據(jù)主從表的關(guān)系,Application表之間還有一定的對應(yīng)關(guān)系,在應(yīng)用中有好多類似訂單頭和訂單行的表,例如銷售訂單(oe_order_headers_all 和 oe_order_lines_all)、采購訂單(po_headers_all 和 po_lines_all)、請購單(po_requisition_headers_all 和 po_requisition_lines_all)等等,主從表之間的連接一般是根據(jù)Id。 _tl,基表,有l(wèi)anguage字段