Oracle CREATE table with constraints | Oracle SQL fundamentals

Published: 27 December 2018
on channel: DBA Genesis
3,662
45

You can use the CREATE TABLE statement to enforce several different kinds of #constraints on a table: candidate keys, primary keys, foreign keys, and check conditions. A CONSTRAINT clause can constrain a single #column or group of columns in a #table.
The point of these constraints is to get #Oracle to do most of the work in maintaining the integrity of your #database. The more constraints you add to a table definition, the less work you have to do in applications to maintain the #data. On the other hand, the more constraints there are in a table, the longer it takes to #update the data.
You can specify constraints in one of two ways: as part of the column definition (known as a column constraint) or at the end of the CREATE TABLE statement (known as a table constraint). Clauses that constrain several columns must be table constraints.

00:00 Create table with constraints
01:14 Create books tables
02:21 Create table without using constraints name
05:37 Create members tables
12:05 Create table with constraints Examples

Website: https://www.dbagenesis.com/
Facebook:   / dbagenesis  
Instagram:   / dbagenesis  
Twitter:   / dbagenesis