O'Reilly logo

Netezza SQL by Mike Larkins, Tom Coffing

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 16 – Tables, DDL, and Data Types

"To have everything is to possess nothing.“

Buddha

CREATE TABLE Syntax

The following is the syntax for using CREATE TABLE:

CREATE  TABLE  [<database-name>.]<table-name>(  <column-name> <data-type> [<column-level-attribute>] [<column-level-constraint>  ][...,<column-name> <data-type> [<column-level-attribute>] [<column-level-constraint>] ] ) [CONSTRAINT <constraint-name>] CHECK (<comparison>)                                      ] [CONSTRAINT <constraint-name>] FOREIGN KEY ({<column-name> | <column-list>})              REFERENCES  <table-name> ({<column-name> | <column-list>})                ] [CONSTRAINT <constraint-name>] [PRIMARY KEY]                                                             ({<column-name> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required