| PostgreSQL 8.0.0 �����ĵ���PostgreSQL �й� ������ | ||||
|---|---|---|---|---|
| Prev | Fast Backward | Chapter 5. ���ݶ��� | Fast Forward | Next | 
һ���ֶο��Ը���ȱʡֵ������´�����һ�������У�����Щ�ֶε���ֵû����������ô��Щ�ֶν�����������Ǹ��Ե�ȱʡֵ�� һ������������Ҳ������ȷ��Ҫ���һ���ֶ����ó�Ϊ����ȱʡֵ�� ����������֪�������ֵ��ʲô�����й����ݲ����������� Chapter 6����
���û����ȷ����ȱʡֵ����ôȱʡֵ�ǿա� ��ô��ͨ���Ǻ���ģ���Ϊ��ֵ������Ϊ����δ֪���ݡ�
��һ�������ȱʡֵ�����ֶ��������ͺ����г������磺
CREATE TABLE products (
    product_no integer,
    name text,
    price numeric DEFAULT 9.99
);
ȱʡֵ������һ���������ʽ�������ڲ���ȱʡֵ��ʱ����㣨�����������ʱ�� һ��������������һ�� timestamp �ֶο�����ȱʡֵ now()�� ������������Ϊ�����е�ʱ�̡� ����һ��������������Ϊÿһ������һ��"���к�"�� �ڡ�PostgreSQL���ͨ�������������������Ķ������ɵ�
CREATE TABLE products (
    product_no integer DEFAULT nextval('products_product_no_seq'),
    ...
);����ġ�nextval()����һ�����ж��� �����ġ�Section 9.12���ṩ��̵���ֵ�� ���������dz��ձ飬������������һ���������д���ڴ�Ŀ�ģ�
CREATE TABLE products (
    product_no SERIAL,
    ...
);SERIAL����д��Section 8.1.4�����н�һ��������