Oracle Database Introduction
What Oracle Database is, getting a free instance to practice on, connecting via SQL*Plus, and the DUAL table.
What Oracle Database is
Oracle Database is a commercial, enterprise-grade relational database management system first released in 1979 — the first commercially available SQL RDBMS on the market, predating both MySQL and PostgreSQL by well over a decade. Decades of continuous development went into two things most competitors treat as secondary: rock-solid transactional consistency at very large scale, and a procedural language (PL/SQL, covered starting a few pages into this track) that lives inside the database itself rather than bolted on as an afterthought.
That history is exactly why Oracle still runs the back office of a huge share of the world's largest organizations. Walk into almost any bank's core ledger, a telecom's billing system, an airline's reservation system, a national tax authority, or the database layer under a large SAP or Oracle E-Business Suite ERP deployment, and there's a good chance Oracle is underneath it. These are systems where downtime is measured in regulatory fines, where a single transaction might touch millions of dollars, and where the workload has been tuned by specialist DBAs for twenty years. Oracle's licensing is expensive and its footprint is heavy compared to open-source alternatives, which is exactly why it's rare to see it chosen for a new startup's web app — but it's very much not going away in the enterprise, government, and finance sectors that already run on it.
Everything you already know about ANSI SQL (SELECT, joins, GROUP BY, subqueries — covered in this app's general SQL track) works against Oracle largely unchanged. This track covers what's genuinely different about Oracle: PL/SQL, sequences, analytic functions, the DUAL table, Oracle's own execution-plan tooling, and the procedural features (stored procedures, packages, triggers) that Oracle-based enterprise systems lean on heavily.
Getting a free instance to practice on
You don't need an enterprise budget to follow along. Two free, legitimate ways to get a real Oracle instance running:
- Oracle Database Free (the modern successor to the old "Oracle XE") — a full-featured, no-cost edition of Oracle Database 23ai meant specifically for developers to learn and build on. It ships as a Docker image (
docker run -d -p 1521:1521 -e ORACLE_PWD=YourPassword123 gvenzl/oracle-free) or as a native installer for Linux/Windows. It has generous limits (up to 12 GB of user data) that are more than enough for every example in this track. - Oracle Cloud Always Free tier — Oracle Cloud Infrastructure (OCI) gives every account two Autonomous Database instances (also 23ai-based) free forever, no credit card charge after signup, fully managed in the cloud with a browser-based SQL worksheet built in — no local install at all.
Either option gives you a real Oracle Database to run every query in this track against. The examples assume nothing beyond what both options provide.
Connecting: SQL*Plus, SQL Developer, and SQLcl
SQL*Plus is Oracle's original command-line client, bundled with every Oracle installation. It's bare-bones but always available:
sqlplus username/password@localhost:1521/freepdb1
freepdb1 is the default pluggable database name in Oracle Database Free. Once connected you get a SQL> prompt ready for statements.
SQL Developer is Oracle's free graphical client (a desktop app) — a connection tree, a query editor with autocomplete, and a visual explain-plan viewer. It's the closest Oracle equivalent to tools like DBeaver or MySQL Workbench, and it's what most working Oracle developers use day to day.
SQLcl is a newer, modern command-line client from Oracle — same idea as SQLPlus, but with command history, syntax highlighting, and better output formatting. If you're comfortable in a terminal, it's a nicer experience than SQLPlus for the same job.
Any of the three runs every example in this track identically — pick whichever fits how you like to work.
Statement terminators: the semicolon and the slash
In SQL*Plus and SQLcl, a plain SQL statement ends with a semicolon, same as any other SQL dialect:
SELECT * FROM employees;
PL/SQL blocks (covered starting on the PL/SQL fundamentals page) are terminated differently — the block itself ends with END;, and then a lone / on its own line tells the client "run everything since the last statement now":
BEGIN
DBMS_OUTPUT.PUT_LINE('Hello from PL/SQL');
END;
/
You'll see that trailing / throughout this track on every PL/SQL block, procedure, function, package, and trigger — it's not optional in SQL*Plus/SQLcl, so get used to typing it.
The DUAL table
Some databases let you run SELECT 1 + 1; with no FROM clause at all. Oracle's grammar has always required a FROM clause on every SELECT, even one that isn't really selecting from any real table — evaluating an expression, calling a function, or checking the current date. Oracle's answer is DUAL: a tiny built-in table, owned by SYS, containing exactly one column (DUMMY) and exactly one row (the value 'X'). It exists purely to give a SELECT something to have a FROM clause pointed at:
SELECT SYSDATE FROM DUAL;
SELECT 2 + 2 FROM DUAL;
SELECT USER FROM DUAL;
You'll reach for DUAL constantly — testing a function's output, checking a sequence's next value (covered later in this track), or just confirming you're connected to the database you think you are.
Your first query
Put it together:
SELECT 'Hello World' FROM DUAL;
'HELLOWORLD'
------------
Hello World
That's a full round trip: connect with SQL*Plus, SQL Developer, or SQLcl against a free Oracle Database Free or OCI Always Free instance, and run a query. Everything from here builds on exactly this connection — the next page covers Oracle's data types and CREATE TABLE syntax, building a real schema you'll reuse for the rest of this track.
Common mistakes
- Forgetting the trailing
/after a PL/SQL block in SQL*Plus/SQLcl — the block just sits there waiting, because the client is still collecting input. - Writing
SELECT SYSDATE;out of habit from a database that allows aFROM-lessSELECT— Oracle rejects it; it has to beSELECT SYSDATE FROM DUAL;. - Confusing Oracle Database Free (a real, full Oracle Database engine you install or run in a container) with a hosted sandbox — it's a genuine Oracle instance, so everything you learn against it, including PL/SQL and tuning behavior, carries over directly to a production Oracle system.