From the course: Introduction to Oracle SQL (26ai)

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Run basic Oracle SQL commands, part one

Run basic Oracle SQL commands, part one - Oracle Database Tutorial

From the course: Introduction to Oracle SQL (26ai)

Run basic Oracle SQL commands, part one

- [Instructor] Welcome. This lesson provides an introduction to Structured Query Language, or SQL. You will learn how to create tables with primary keys, columns, constraints, indexes, and foreign keys by writing these basic commands in your provisioned Oracle Autonomous Database instance SQL worksheet. Let's go. We will begin by creating two tables. First, we'll create a departments table with a primary key called department number, or deptno, and we'll add some basic information like name and location. Then we'll create an employees table that has a foreign key which links to the departments table to establish a relationship. Here, the departments table has a primary key, which means that each department will have a unique department number. The employees table references this department number as a foreign key, linking each employee to a specific department. In a real-world scenario, these foreign key…

Contents