PostGr-SQL database创建表

 

postgres=# create database vertigo_sandbox;

postgres=# \connect vertigo_sandbox

 

vertigo_sandbox=# CREATE TABLE gfxpv_testplan
vertigo_sandbox-# (
vertigo_sandbox(# test_id bigserial NOT NULL, -- the primary key
vertigo_sandbox(# test_name character varying(255) NOT NULL, -- the test name
vertigo_sandbox(# CONSTRAINT "PK_test" PRIMARY KEY (test_id)
vertigo_sandbox(# );
NOTICE: CREATE TABLE will create implicit sequence "gfxpv_testplan_test_id_seq"
for serial column "gfxpv_testplan.test_id"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "PK_test" for tab
le "gfxpv_testplan"
CREATE TABLE
vertigo_sandbox=#

posted @ 2014-08-05 18:03  Gui Kai  阅读(430)  评论(0编辑  收藏  举报