EDUCBA

EDUCBA

MENUMENU
  • Explore
    • Lifetime Membership
    • All in One Bundles
    • Fresh Entries
    • Finance
    • Data Science
    • Programming and Dev
    • Excel
    • Marketing
    • HR
    • PDP
    • VFX and Design
    • Project Management
    • Exam Prep
    • All Courses
  • Blog
  • Enterprise
  • Free Courses
  • Log in
  • Sign up
Home Data Science Data Science Tutorials SQL Tutorial sqlplus set commands

sqlplus set commands

Updated March 10, 2023

sqlplus set commands

Introduction to sqlplus set commands

The following articles provide an outline for sqlplus set commands. SQL*Plus is an interactive tool to execute a batch query that is installed on client installation or Oracle server. The SQL*plus commands configure the environment such as to edit, store, retrieve, enter or run SQL commands. It is a command-line tool that offers access to organize the Relational database of Oracle. It is used to update and delete the database tables and helps the user to submit the SQL blocks for execution in the Oracle server. In addition, the DDL commands play a major role in creating, edit and dropping objects from the database. The different commands used in SQL*plus are briefly explained in this article.

Start Your Free Data Science Course

Hadoop, Data Science, Statistics & others

Overview of sqlplus set commands

SQL*plus is the common utility on database operations which is mostly used by programmers, admins, and users and has its special commands in the environment. It enables the user to perform computations, stores, print queries, format, and SQL/PL blocks. The SQL commands are explained in this article.

All sqlplus set commands

@ symbol represents to execute the SQL*plus queries in the script. It can be fetched from the webserver or local file system.

@@ is mentioned to execute the script, which is useful to execute the nested scripts as it opts for the suitable script in the same location from which it is fetched.

/ represents to execute PL\SQL block or SQL command.

ACCEPT terms to read an input line and save it in an allocated user variable.

APPEND is used to insert text to stop the currently executed line in the buffer area.

ARCHIVE LOG is used to stop or start the automated archive of online redo transaction logs and displays the information in redo transaction logs

ATTRIBUTE is used to view the characters of an object type column and explain every single character of the object

BREAK is used to change the formatting for the specified title at the bottom of every report page and list the current definition also.

BTITLE formats the suitable title at every bottom of the report page and lists the title page’s current definition.

CHANGE is used to change the text on every current line in the buffer

CLEAR is used to erase and reset the current clause for setting the specific option similar to column and break

COLUMN is used to specify the display characters for the selected column and list the current characteristic of every column.

COMPUTE is used to print and calculate the summary lines with different standard computation or the subset of a given row and lists all the definitions related to the computing

CONNECT is used to connect the provided user to the Oracle database.

COPY is used to copy the result from the input query to the table in a remote or local database.

DEFINE is used to specify user variables and allots them to every CHAR value, and list every variable type

DEL is used to delete one or multiple lines of the buffer area

DESCRIBE is used to list the definition of column for the specific table, synonym and view the specification for the given procedure or function

DISCONNECT is used to pledge the pending change to logs and database for the current user in Oracle, but it is not present in SQL*plus.

EDIT is used to invoke the operating system of the host’s text editor on the suitable file content of the buffer area.

EXECUTE is used to run the single SQL/PL statement

EXIT is used to stop the SQL*plus and call the control of the operating system

GET is used to load the file from the operating system of the host into the SQL buffer.

HELP is used to access the system of SQL*plus.

HOST is used to execute the operating system of the host without executing the SQL*plus command

INPUT is used to insert one or multiple lines after the current line in the buffer area.

LIST is used to view one or many lines from SQL buffer

PASSWORD enables the password to be changed without any echo of the password of an input device.

PAUSE is used to view the suitable text and then wait for the user to return to the home page.

PRINT is used to view the current character of the bind variable

PROMPT is used to transfer the suitable messages to the screen of the user

QUIT is used to stop the SQL*plus and returns the control to the operating system, which is the same as exit.

Examples of sqlplus set commands

RECOVER is used to do recovery of media in one or multiple tablespaces and perform recovery of one or multiple data files and possibly in the entire database.

REMARK is used to insert a comment in a script.

REPHEADER is used to format the chosen report header at the beginning of every report and view the definition of REPHEADER

RUN is used to execute and list the SQL command and SQL block saved in the buffer area of SQL.

SAVE is used to save the information of SQL buffer in the operating system file in the host.

SET is used to fix the system variable to edit the SQL*plus environment in the current session.

SHOW is used to display the character of SQL*plus system environment

SHUTDOWN is used to shut down the present executing Oracle instances.

SPOOL is used to save the result queries in the operating system’s file and transfers the file to the printer.

START is used to initiate the content of the suitable script.

STARTUP is used to initiate the Oracle instances and can open a database, and there is an option to mount it.

STORE is used to save the attributes in the existing SQL*plus an operating system of the host.

TIMING is used to save the timing data for elapsed time and view the count of active timers.

UNDEFINE is used to delete one or multiple variables, which defines the command as implicit or explicit.

WHENEVER OSERROR is used to execute the specific action if an os command produces any error.

WHENEVER SQLERROR is used to execute the specified action when SQL command blocks any occurred error.

Conclusion

Hence these are some of the commands executed in the SQL*plus environment and help beginners to work in the SQL*plus environment as proficient.

Recommended Articles

This is a guide to sqlplus set commands. Here we discuss some of the commands executed in the SQL*plus environment and help beginners. You may also have a look at the following articles to learn more –

  1. SQL if then else
  2. SQL extensions
  3. SQL Column Alias
  4. SQL SUM()
ADVERTISEMENT
All in One Excel VBA Bundle
500+ Hours of HD Videos
15 Learning Paths
120+ Courses
Verifiable Certificate of Completion
Lifetime Access
ADVERTISEMENT
Financial Analyst Masters Training Program
2000+ Hours of HD Videos
43 Learning Paths
550+ Courses
Verifiable Certificate of Completion
Lifetime Access
ADVERTISEMENT
All in One Data Science Bundle
2000+ Hour of HD Videos
80 Learning Paths
400+ Courses
Verifiable Certificate of Completion
Lifetime Access
ADVERTISEMENT
All in One Software Development Bundle
5000+ Hours of HD Videos
149 Learning Paths
1050+ Courses
Verifiable Certificate of Completion
Lifetime Access
Primary Sidebar
Footer
About Us
  • Blog
  • Who is EDUCBA?
  • Sign Up
  • Live Classes
  • Certificate from Top Institutions
  • Contact Us
  • Verifiable Certificate
  • Reviews
  • Terms and Conditions
  • Privacy Policy
  •  
Apps
  • iPhone & iPad
  • Android
Resources
  • Free Courses
  • Database Management
  • Machine Learning
  • All Tutorials
Certification Courses
  • All Courses
  • Data Science Course - All in One Bundle
  • Machine Learning Course
  • Hadoop Certification Training
  • Cloud Computing Training Course
  • R Programming Course
  • AWS Training Course
  • SAS Training Course

ISO 10004:2018 & ISO 9001:2015 Certified

© 2023 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

Let’s Get Started

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA
Free Data Science Course

Hadoop, Data Science, Statistics & others

By continuing above step, you agree to our Terms of Use and Privacy Policy.
*Please provide your correct email id. Login details for this Free course will be emailed to you

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA Login

Forgot Password?

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more

🚀 Extended Cyber Monday Price Drop! All in One Universal Bundle (3700+ Courses) @ 🎁 90% OFF - Ends in ENROLL NOW