Jump to content
  • Advertisement
Sign in to follow this  
jrmiller84

[web] Simple SQL Question

This topic is 4315 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!