|
Home > Archive > MS SQL Server > December 2006 > How to allow null by SQL
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
How to allow null by SQL
|
|
|
| I have a field in a table, which is not allow null.
How can I set it to allow by SQL?
| |
| Kalen Delaney 2006-12-06, 5:15 am |
| You can use the ALTER TABLE command:
ALTER TABLE my_table ALTER COLUMN my_column column_datatype NULL
--
HTH
Kalen Delaney, SQL Server MVP
http://sqlblog.com
"ad" <flying@wfes.tcc.edu.tw> wrote in message
news:uBqoduPGHHA.1252@TK2MSFTNGP02.phx.gbl...
>I have a field in a table, which is not allow null.
> How can I set it to allow by SQL?
>
| |
| Hari Prasad 2006-12-06, 7:12 pm |
| Hello,
Add on to Kalen; You can not chnage the column to Nullable if the column is
associated with a Primary key. Where as for a Unique column if you set a
NULL set even then
only one null will be allowed.
Thanks
Hari
"Kalen Delaney" < replies@public_newsg
roups.com> wrote in message
news:ezwlW%23PGHHA.3464@TK2MSFTNGP05.phx.gbl...
> You can use the ALTER TABLE command:
>
> ALTER TABLE my_table ALTER COLUMN my_column column_datatype NULL
>
> --
> HTH
> Kalen Delaney, SQL Server MVP
> http://sqlblog.com
>
>
> "ad" <flying@wfes.tcc.edu.tw> wrote in message
> news:uBqoduPGHHA.1252@TK2MSFTNGP02.phx.gbl...
>
>
|
|
|
|
|