Skip to main content
gamedev.net
🔒 Locked

[web] Simple SQL Question

Started by jrmiller84 Sep 29, 2006 at 2:23 PM 0 replies 500+ views
Original Post
jrmiller84
jrmiller84
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!
I will forever be a student.
jrmiller84
jrmiller84
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!
I will forever be a student.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.