|
蓝森林 http://www.lslnet.com 2006年8月25日 8:28
[asp]关于CREATE新建表(ACCESS数据库)默认值问题
相关代码如下:
sql="create table Guest ([GuestId] AUTOINCREMENT,[GuestMaxId] int,[GuestName] text(50),[GuestSex] text(10),[GuestQicq] text(20),[GuestMsn] text(50),[GuestTitle] text,[GuestContent] memo,[GuestDatetime] date,[GuestReplaDatetime] date, [GuestIsPassed] BIT,PRIMARY KEY ([GuestId]));"
请问如何给上面的GuestMaxId GuestReplaDatetime 等列加入默认值呢?
就像直接在ACCESS软件中新建表那样加入默认值。比如日期字段就当前日期时间
|
[GuestMaxId] int default 0
[GuestReplaDatetime] datetime now()
[GuestName] nvarchar(50) default "默认值" |
不行。。
不能通过。
说明一下,我指的是ACCESS数据库。 |
|