【正文】
其中 ROWID前加 $ 3)找到 OUTER , 在 OUTER TABLE 中的字段前加上 tab_name; 4)查詢 GROUP BY ,ORDER BY ,WITH HOLD做相應(yīng)修改即可。 五、 SQLPLUS基本用法 SQL and SQL*Plus Interaction SQL*Plus SQL Statements Buffer SQL Statements Server Query Results SQL*Plus Commands Formatted Report SQL Statements Versus SQL*Plus Commands SQL statements SQL ? A language ? ANSI standard ? Keyword cannot be abbreviated ? Statements manipulate data and table definitions in the database SQL*Plus ? An environment ? Oracle proprietary ? Keywords can be abbreviated ? Commands do not allow manipulation of values in the database SQL buffer SQL*Plus mands SQL*Plus buffer –Log in to SQL*Plus. –Describe the table structure. –Edit your SQL statement. –Execute SQL from SQL*Plus. –Save SQL statements to files and append SQL statements to files. –Execute saved files. –Load mands from file to buffer to edit. Overview of SQL*Plus SQLPLUS 1. Log in to SQL*PLUS sqlplus ds/ds 2. Describe the table structure desc(ribe) tablename 3. Edit your SQL statement ed 4. Displays and runs the SQL statement in the buffer R[UN] , / Logging In to SQL*Plus –From Windows environment: –From mand line: sqlplus [username[/password [@database]]] Displaying Table Structure ?Use the SQL*Plus DESCRIBE mand to display the structure of a table. DESC[RIBE] tablename Displaying Table Structure SQL DESCRIBE dept Name Null? Type DEPTNO NOT NULL NUMBER(2) DNAME VARCHAR2(14) LOC VARCHAR2(13) SQL*Plus Editing Commands –A[PPEND] text –C[HANGE] / old / new –C[HANGE] / text / –CL[EAR] BUFF[ER] –DEL –DEL n –DEL m n SQL*Plus Editing Commands –I[NPUT] –I[NPUT] text –L[IST] –L[IST] n –L[IST] m n –R[UN] –n –n text –0 text SQL*Plus File Commands –SAVE filename –GET filename –START filename –@ filename –EDIT filename –SPOOL filename SQL Debugging NT example : SET FGLSQLDEBUG=3 fglrun myprog 2 Unix (shell) example : FGLSQLDEBUG=3 export FGLSQLDEBUG fglrun myprog 2