Sign in to follow this  

[web] Simple SQL Question

This topic is 4097 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Alright guys, you've always been a great help so hopefully that legacy will live on :) I've got a query I am trying to write here that will alter a columns default value. Ive tried a plethora of different ways through all the research I've done but can't get one that works. The one thing that is making this harder is that it is for an Access database(puke) and it must be done through a query, not the design view. Currently what I have is:

ALTER TABLE Session_Master ADD COLUMN Attempts Number Not Null Default 0

It gives an error on the '0'. I've been researching for a few days on and off and can't seem to find a definite resource on how to add this correctly. Any help would be spectacular, thanks!

Share this post


Link to post
Share on other sites
Sorry everyone, just figured this one out via a MSDN article. Just for reference in case anyone is looking, you can NOT specify a DEFAULT clause in an Alter table statement through Access's query designer. This MUST be done through ADO. Worked like a charm when done through ADO. Thanks anyways!

Share this post


Link to post
Share on other sites

This topic is 4097 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this