I have a field in a table, which is not allow null.
How can I set it to allow by SQL?
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?
>
|||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_newsgroups.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...
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment