Hi All,

I am trying to create a table and default the two integer fields to zero.

What is the proper syntax for a MS access database table?



The following creates the table but with null values in the fields of Q00Flag, and Q01.



CREATE TABLE CAT01

(

CAT01id AUTOINCREMENT,

Carnumber varchar(25),

DateCreated  datetime,

Q00Flag integer not null ,

Q01 integer not null ,

Q01Date  datetime

)


I want to create this table such that these fields are created with a default value of zero.

Also such that when records are inserted into the table,

then that these fields are automatically set to zero

if not otherwise specified by values in the insert statement.





These do not work.

Q01 integer  set default '0',

Q01 integer not null default '0',



Could someone help me?
PS I am using WINSQL as the db tool.

Regards

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


_______________________________________________
Reply to DFWCFUG: [email protected] Subscribe/Unsubscribe: http://lists1.safesecureweb.com/mailman/listinfo/list List Archives: http://www.mail-archive.com/list%40list.dfwcfug.org/ http://www.mail-archive.com/list%40dfwcfug.org/ DFWCFUG Sponsors: www.HostMySite.com www.teksystems.com/

Reply via email to