Default Value

D

Darren

How can I set the default value of a new field using SQL

Trying...

Alter Table Reports add Column RepTypes Integer Default 0

But it doesn't like it


Thanks
 
M

MGFoster

Darren said:
How can I set the default value of a new field using SQL

Trying...

Alter Table Reports add Column RepTypes Integer Default 0

But it doesn't like it

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

What version of Access? If Access2002, and higher, make sure the Tools
Options > Tables/Queries: SQL Server Compatible Syntax (ANSI 92),
"This Database" check box is checked.

Versions previous to Access 2002 (2000?) don't have the ability to

Correct DDL:

Alter Table Reports alter Column RepTypes Integer Default 0

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQg0NBIechKqOuFEgEQIuxgCgjtGkreQUmU42up0CRvK5xpl6X+4AoPOZ
RPrv5nG8/Scs3p89lqYRO7BP
=CHCx
-----END PGP SIGNATURE-----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top