CREATE TABLE problems: Foreign key references.

From SQLZOO
Jump to: navigation, search

CREATE TABLE problems: Foreign key references.

schema:scott

A foreign key should refer to a candidate key in some table. This is usually the primary key but may be a field (or list of fields) specified as UNIQUE.

You must have REFERENCE permission on the table being referenced.

DROP TABLE t_stupid
 
CREATE TABLE t_stupid (a INTEGER
   ,FOREIGN KEY(a)
       REFERENCES cia(population))
Personal tools
Namespaces

Variants
Actions
Reference
Toolbox
Google AdSense