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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Allow Zero Length

Status
Not open for further replies.

jalbao

Programmer
Nov 27, 2000
413
US
Using MS Access 2000

What is the sql statement for setting a field to "Allow Zero Length"?

I need to alter a table using a sql query (not the GUI).
 
Also, I'm having an interesting problem w/ altering a field.

I currently have a field that does not allow nulls (Required = Yes).

I need to alter the field to allow for nulls. So I ran the following query:

Code:
ALTER tblTable
ALTER field1 VARCHAR(25) NULL

The query ran fine w/ no errors, but the field1 properties did not change - it still is set to "Required = Yes".

Here's the weird part, I ran the following query on a field that allows nulls:

Code:
ALTER tblTable
ALTER field2 VARCHAR(99) NOT NULL

The query successfully changed field2 to not allow nulls.

Very strange in my mind.

Does anyone know how to use sql to alter a field to allow nulls if the field is already set to not allow nulls?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top