Sep 29, 2004 #1 jalbao Programmer Joined Nov 27, 2000 Messages 413 Location 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).
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).
Sep 29, 2004 Thread starter #2 jalbao Programmer Joined Nov 27, 2000 Messages 413 Location US 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? Upvote 0 Downvote
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?