[ Pobierz całość w formacie PDF ]
.DESCRIBEPurpose Describe a function, package, package body, procedure, table, or view.Prerequisites You must be currently connected to a database.Syntax DESCRIBE command ::=where:DBA Command Reference B-9 DESCRIBEnameThe name of the object to describe.Usage Notes If you do not specify an object type, Server Manager attempts todetermine the object type.For the statementDESCRIBE empServer Manager describes the table or view if a table or view with the name EMPexists.If no table or view with that name exists in the user s schema, ServerManager will search for a PL/SQL function, procedure, or package with that nameand describe it.The shorthand DESC is now equivalent to the command DESCRIBE.This meansthat DESC has been added to the list of Server Manager reserved words.If youhave a database object namedDESC, you need to place quotes around the name to showthat it is an object name.For example:INSERT INTO  DESC VALUES( onetwothree , 123); )Note: Some versions of PL/SQL allow the user to describe a package by givingthe package name, and some versions require the user to specify an object in thepackage to describe.Server Manager supports package description for thoseversions of PL/SQL which support this functionality.Example A command likeDESCRIBE scott.addempproduces output similar to the following example:PROCEDURE SCOTT.ADDEMP (EMPNO INTEGER, ENAME VARCHAR2, SAL NUMBER(9,2))The use of the object type is no longer required.If you do not specify an object type,Server Manager attempts to determine the object type.For the statementDESCRIBE empServer Manager describes the table or view if a table or view with the name EMPexists.If no table or view with that name exists in the user s schema, Server Managersearches for a PL/SQL function, procedure, or package with that name anddescribes it.For the statementDESCRIBE payroll.empServer Manager looks for a table or view in schema PAYROLL with the name EMP.B-10 Oracle Enterprise Manager Administrator s Guide EXECUTEIf there is no PAYROLL schema or no EMP table/view in the PAYROLL schema,Server Manager will search the current schema for a package PAYROLL containinga function or procedure EMP.If both a table EMP in schema PAYROLL and a package PAYROLL with function/procedure EMP in the current schema exist, the statementDESCRIBE FUNCTION payroll.empThis allows you to specify the type of the object you want to describe.Server Manager now has the capability to describe both functions and procedurescontained in packages.Previously only functions and procedures not contained inpackages could be described.Note: Some versions of PL/SQL allow the user to describe a package by givingthe package name, and some versions require the user to specify an object in thepackage to describe.Server Manager supports package description for thoseversions of PL/SQL which support this functionality.DISCONNECTPurpose Disconnect from an Oracle server.Prerequisites You must be currently connected to a database.Syntax DISCONNECT command ::=Usage Notes Upon disconnection, line mode reverts to the current default hostmachine after closing all open cursors and committing any uncommittedtransactions.Example DISCONNECTEXECUTEPurpose Executes a one-line PL/SQL statement.DBA Command Reference B-11 EXITPrerequisites You must be currently connected to a database.You must also haveprivileges to use any stored procedures, packages, package variables, and functionsreferenced with this command.Syntax EXECUTE command ::=Usage Notes You can execute only one line of PL/SQL code with the EXECUTEcommand.If you wish to execute a PL/SQL block with many lines, you must usethe format:BEGIN[PL/SQL BLOCK]END;You can reference any command line mode bind variables in PL/SQL statementsby preceding the variable name with a colon.The example below illustrates the useof bind variables with the VARIABLE, EXECUTE, and PRINT commands.Example VARIABLE balance NUMBEREXECUTE :balance := get_balance(34056)PRINT balanceBALANCE----------4678.24EXITPurpose Exits Server Manager line mode or closes a SQL Worksheet.Prerequisites None [ Pobierz całość w formacie PDF ]

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • higrostat.htw.pl
  •