Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can anyone tell me what this SQL does?

Status
Not open for further replies.

jv6886

Programmer
Dec 31, 2002
46
0
0
US
I inherited some legacy code that I'm trying to refactor. I found this SQL statement, and for the life of me can't figure out what it does:

Code:
ALTER TABLE [Location] ALTER COLUMN [Location_Address] SET DEFAULT

Now I know what it should do if there were a value of some sort after the SET DEFAULT statement, but there is no value.

Any ideas anyone?

Thanks,
wcprog
 
By the way, its for a Jet 4.0 database.

wcprog
 
And this SQL executes without error on a Jet 4.0 database ?
 
Yes. It's actually a whole series of the same statement, but specifying different tables and fields.
 
In ac2003 I get a syntax error ...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Actually I'm running this from Visual Basic 6 using ADO. In stepping through it I'm not getting any errors. The code snippit is as follows:

Code:
strSQL = "ALTER TABLE [Location] " & _
         "ALTER COLUMN [Location_Address] " & _
         "SET DEFAULT"
    
Call CON.Execute(strSQL)
I just tried another test case, and it appeared to reset the default--in this case from a text string to nothing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top