蓝森林首页 | 返回主页 | 本站地图 | 站内搜索 | 联系信箱 |
 您目前的位置:首页 > 自由软件 > 技术交流 > 应用编程


    

蓝森林 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数据库。




Copyright © 1999-2000 LSLNET.COM. All rights reserved. 蓝森林网站 版权所有。 E-mail : webmaster@lslnet.com