postgresql insert value in table in serial value
Posted
by
Jesse Siu
on Stack Overflow
See other posts from Stack Overflow
or by Jesse Siu
Published on 2012-10-11T09:08:19Z
Indexed on
2012/10/11
9:37 UTC
Read the original article
Hit count: 205
database
|postgresql
my database using postgresql. the table pk is uing serial value.if i want to insert a record in table, do i need type pk or it will automatic contain id. Can you give me a example about how to insert a record in dataset
CREATE TABLE dataset
(
id serial NOT NULL,
age integer NOT NULL,
name character varying(32) NOT NULL,
description text NOT NULL DEFAULT ''::text
CONSTRAINT dataset_pkey PRIMARY KEY (id )
)
© Stack Overflow or respective owner