Chapter 1. Introduction to SQL*Plus
SQL*Plus is the command-line interface to the Oracle database. It exists to let you enter and execute ad hoc SQL statements and PL/SQL code blocks, and, if you're a database administrator (DBA), to issue database administration commands such as STARTUP and SHUTDOWN. This chapter explains what SQL*Plus is, how it relates to the Oracle database, and why you should master it. At the end of the chapter, I'll introduce you to the sample data used for many of the examples in this book. You can load the data and follow along as you read.
What Is SQL*Plus?
SQL*Plus is essentially an interactive query tool with some scripting capabilities. You can enter a SQL statement, such as a SELECT query, and view the results. You can execute data definition language (DDL) statements to create tables and other objects. DBAs can use SQL*Plus to start up, shut down, and otherwise administer a database. You can even enter and execute PL/SQL code.
SQL*Plus is primarily a command-line application, but, despite its lack of "flash," it is a workhorse tool used daily by database administrators, developers, and yes, even end users. As a DBA, it is my tool of choice for managing the databases under my care. I use it to peek under the hood—to explore the physical implementation of my database, and to create and manage users, tables, and tablespaces. In my role as a developer, SQL*Plus is the first tool that I fire up when I need to develop a query. In spite of all the fancy, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access