?
Netkiller PostgreSQL 手札
?
文档始创于2012-11-16
版权 ? 2010, 2011, 2012, 2013 Netkiller(Neo Chan). All rights reserved.
版权声明
转载请与作者联系,转载时请务必标明文章原始出处和作者信息及本声明。
|
|
?
$Date: 2013-04-10 15:03:49 +0800 (Wed, 10 Apr 2013) $
我的系列文档
?
Netkiller Architect 手札 | Netkiller Developer 手札 | Netkiller PHP 手札 | Netkiller Python 手札 | Netkiller Testing 手札 | Netkiller Cryptography 手札 |
Netkiller Linux 手札 | Netkiller CentOS 手札 | Netkiller FreeBSD 手札 | Netkiller Security 手札 | Netkiller Version 手札 | Netkiller Web 手札 |
Netkiller Monitoring 手札 | Netkiller Storage 手札 | Netkiller Mail 手札 | Netkiller Shell 手札 | Netkiller Network 手札 | Netkiller Database 手札 |
Netkiller PostgreSQL 手札 | Netkiller MySQL 手札 | Netkiller NoSQL 手札 | Netkiller LDAP 手札 | Netkiller Cisco IOS 手札 | Netkiller H3C 手札 |
Netkiller Multimedia 手札 | Netkiller Docbook 手札 | Netkiller 开源软件 手札 | ? | ? | ? |
?
PostgreSQL 实用实例参考
PostgreSQL 实用实例参考 (PDF)2004-07-20
PostgreSQL 实用实例参考 (BIG5 PDF)2004-07-20
PostgreSQL 实用实例参考 (HTML)2004-07-20
PostgreSQL 实用实例参考 (BIG5 HTML)2004-07-20
?
5.3.?账户表/余额表/消费储蓄表
此表适用于购物车等金钱来往账面等等。
-- Table: account -- DROP TABLE account; CREATE TABLE account ( id integer NOT NULL DEFAULT nextval('trade_id_seq'::regclass), no character varying(10) NOT NULL, -- 账号 balance money NOT NULL DEFAULT 0.00, -- 余额 datetime timestamp without time zone NOT NULL DEFAULT (now())::timestamp(0) without time zone, CONSTRAINT account_pkey PRIMARY KEY (id) ) WITH ( OIDS=FALSE ); ALTER TABLE account OWNER TO dba; COMMENT ON COLUMN account.no IS '账号'; COMMENT ON COLUMN account.balance IS '余额'; -- Index: account_no_idx -- DROP INDEX account_no_idx; CREATE INDEX account_no_idx ON