p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

access thread: ALTER TABLE


Message #1 by "Mark Chen" <mchen@h...> on Tue, 4 Jun 2002 00:25:42
Hi there,

Due to my developing environment, I need to use SQL queries to make 
changes to my Access database. Unfortunately, I could not seem to find a 
complete syntax chart for that.

For example, trying to use the following statement throws me back an 
syntax error:

ALTER TABLE tbl1
ADD
  field1 long DEFAULT 0

after the err, the cursor stays on that 0.

Any idea on how to set the default value? Any body knows where to get a 
complete syntax?

Mark
Message #2 by "Leo Scott" <leoscott@c...> on Mon, 3 Jun 2002 16:51:11 -0700
If you are trying to do this from the GUI and not VBA code (using ADO) some
of the Jet 4 ANSI-92 Extensions are not avaliable in the GUI.  DEFAULT may
be one of them.

|-----Original Message-----
|From: Mark Chen [mailto:mchen@h...]
|Sent: Tuesday, June 04, 2002 12:26 AM
|To: Access
|Subject: [access] ALTER TABLE
|
|
|Hi there,
|
|Due to my developing environment, I need to use SQL queries to make
|changes to my Access database. Unfortunately, I could not seem to find a
|complete syntax chart for that.
|
|For example, trying to use the following statement throws me back an
|syntax error:
|
|ALTER TABLE tbl1
|ADD
|  field1 long DEFAULT 0
|
|after the err, the cursor stays on that 0.
|
|Any idea on how to set the default value? Any body knows where to get a
|complete syntax?
|
|Mark
|


  Return to Index