CREATE a new table

From SQLZOO
Jump to navigation Jump to search

CREATE a new table

schema:scott

The following are examples of field types:

INTEGERA whole number
VARCHAR(10)Up to 10 characters.
CHAR(10)Fixed number of characters
DATEA date
TIMESTAMPDate and time
FLOATFloating point numbers
DROP TABLE t_test
CREATE TABLE t_test
 (a INTEGER NOT NULL PRIMARY KEY
 ,b VARCHAR(10)
 )
CREATE TABLE t_test
 (a INTEGER PRIMARY KEY
 ,b VARCHAR2(10)
 )
CREATE TABLE t_test
 (a INTEGER PRIMARY KEY
 ,b VARCHAR(10)
 )
DataWars, Data Science Practice Projects - LogoDataWars: Practice Data Science/Analysis with +100 Real Life Projects