Skip to main content

ORACLE SQL * PLUS Commands

SQL*Plus Commands

SQL*Plus commands allow a user to manipulate and submit SQL statements. Specifically, they enable a user to:
  • Enter, edit, store, retrieve, and run SQL statements
  • List the column definitions for any table
  • Format, perform calculations on, store, and print query results in the form of reports
  • Access and copy data between SQL databases
The following is a list of SQL*Plus commands and their functions. The most commonly used commands are emphasized in italics:
  • / – Execute the current SQL statement in the buffer – same as RUN
  • ACCEPT – Accept a value from the user and place it into a variable
  • APPEND – Add text to the end of the current line of the SQL statement in the buffer
  • AUTOTRACE – Trace the execution plan of the SQL statement and gather statistics
  • BREAK – Set the formatting behavior for the output of SQL statements
  • BTITLE – Place a title on the bottom of each page in the printout from a SQL statement
  • CHANGE – Replace text on the current line of the SQL statement with new text
  • CLEAR – Clear the buffer
  • COLUMN – Change the appearance of an output column from a query
  • COMPUTE – Does calculations on rows returned from a SQL statement
  • CONNECT – Connect to another Oracle database or to the same Oracle database under a different user name
  • COPY – Copy data from one table to another in the same or different databases
  • DEL – Delete the current line in the buffer
  • DESCRIBE – List the columns with datatypes of a table (Can be abbreviated as DESC)
  • EDIT – Edit the current SQL statement in the buffer using an external editor such as vi or emacs
  • EXIT – Exit the SQL*Plus program
  • GET – Load a SQL statement into the buffer but do not execute it
  • HELP – Obtain help for a SQL*Plus command (In some installations)
  • HOST – Drop to the operating system shell
  • INPUT – Add one or more lines to the SQL statement in the buffer
  • LIST – List the current SQL statement in the buffer
  • QUIT – Exit the SQL*Plus program
  • REMARK – Place a comment following the REMARK keyword
  • RUN – Execute the current SQL statement in the buffer
  • SAVE – Save the current SQL statement to a script file
  • SET – Set an environemnt variable to a new value
  • SHOW – Show the current value of an environemnt variable
  • SPOOL – Send the output from a SQL statement to a file
  • START – Load a SQL statement located in a script file and then run that SQL statement
  • TIMING – Used to time the execution of SQL statements for performance analysis
  • TTITLE – Place a title on the top of each page in the printout from a SQL statement
  • UNDEFINE – Delete a user defined variable

Comments

Popular posts from this blog

How to make the email Address Dummy in Oracle Database?

How to make the email Address Dummy in Oracle Database? Query to make the email Address as dummy, update <tablename> set <Columnname> = '@' || <Columnname> where <Columnname>  is not null; Query to Remove the email Address as dummy, update <tablename> set <Columnname>= substr(<Columnname>,2,length(<Columnname>)) where <Columnname> is not null;

How to clear screen in sqlplus

If you want to clear screen in sqlplus window there is small cmd that you need to remember which is below, SQL> select username from dba_users; USERNAME -------------------- BOCMS BOAUDIT  CKI8727 GRU9151 MNA9189 FRE9283  KKO8750  KMU8649 HME9041 ZLP1492 DBE9176  QRA8651  PFI8706 SQL> host cls Once you hit enter the screen will be cleared. SQL> select username from dba_users; USERNAME -------------------- BOCMS BOAUDIT  CKI8727 GRU9151 MNA9189 FRE9283  KKO8750  KMU8649 HME9041 ZLP1492 DBE9176  QRA8651  PFI8706 SQL>clear screen Once you hit enter the screen will be cleared.

Upgrading Windows Server 2008 R2 with a command-line tool using DISM

Windows Server 2008 R2 includes a command-line tool called the Deployment Image Servicing and Management tool, or DISM. It's functionally equivalent to the Windows Anytime Upgrade feature in client versions of Windows. You can run it from an elevated command prompt. To determine the currently installed edition: DISM /online /Get-CurrentEdition To determine the editions you can upgrade to: DISM /online /Get-TargetEditions To actually perform an upgrade: DISM /online /Set-Edition:<edition ID> /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX