Hi
May I know how can I change the property of a table in SQL.
In my table, I need to allow one of the field to be able to accept null and
the table is not empty. Please help. Thanks
Christina
ALTER TABLE MyTable
ALTER COLUMN ColABC NVARCHAR(20) NULL
Change the Table and column names to yours, and the datatype to what your
existing column is.
NULL can be specified in ALTER COLUMN to make a NOT NULL column allow null
values, except for columns in PRIMARY KEY constraints
Regards
Mike
"Chris" wrote:
> Hi
> May I know how can I change the property of a table in SQL.
> In my table, I need to allow one of the field to be able to accept null and
> the table is not empty. Please help. Thanks
> Christina
Showing posts with label accept. Show all posts
Showing posts with label accept. Show all posts
Sunday, February 12, 2012
Change of table property
Hi
May I know how can I change the property of a table in SQL.
In my table, I need to allow one of the field to be able to accept null and
the table is not empty. Please help. Thanks
ChristinaALTER TABLE MyTable
ALTER COLUMN ColABC NVARCHAR(20) NULL
Change the Table and column names to yours, and the datatype to what your
existing column is.
NULL can be specified in ALTER COLUMN to make a NOT NULL column allow null
values, except for columns in PRIMARY KEY constraints
Regards
Mike
"Chris" wrote:
> Hi
> May I know how can I change the property of a table in SQL.
> In my table, I need to allow one of the field to be able to accept null an
d
> the table is not empty. Please help. Thanks
> Christina
May I know how can I change the property of a table in SQL.
In my table, I need to allow one of the field to be able to accept null and
the table is not empty. Please help. Thanks
ChristinaALTER TABLE MyTable
ALTER COLUMN ColABC NVARCHAR(20) NULL
Change the Table and column names to yours, and the datatype to what your
existing column is.
NULL can be specified in ALTER COLUMN to make a NOT NULL column allow null
values, except for columns in PRIMARY KEY constraints
Regards
Mike
"Chris" wrote:
> Hi
> May I know how can I change the property of a table in SQL.
> In my table, I need to allow one of the field to be able to accept null an
d
> the table is not empty. Please help. Thanks
> Christina
Change of table property
Hi
May I know how can I change the property of a table in SQL.
In my table, I need to allow one of the field to be able to accept null and
the table is not empty. Please help. Thanks
ChristinaALTER TABLE MyTable
ALTER COLUMN ColABC NVARCHAR(20) NULL
Change the Table and column names to yours, and the datatype to what your
existing column is.
NULL can be specified in ALTER COLUMN to make a NOT NULL column allow null
values, except for columns in PRIMARY KEY constraints
Regards
Mike
"Chris" wrote:
> Hi
> May I know how can I change the property of a table in SQL.
> In my table, I need to allow one of the field to be able to accept null and
> the table is not empty. Please help. Thanks
> Christina
May I know how can I change the property of a table in SQL.
In my table, I need to allow one of the field to be able to accept null and
the table is not empty. Please help. Thanks
ChristinaALTER TABLE MyTable
ALTER COLUMN ColABC NVARCHAR(20) NULL
Change the Table and column names to yours, and the datatype to what your
existing column is.
NULL can be specified in ALTER COLUMN to make a NOT NULL column allow null
values, except for columns in PRIMARY KEY constraints
Regards
Mike
"Chris" wrote:
> Hi
> May I know how can I change the property of a table in SQL.
> In my table, I need to allow one of the field to be able to accept null and
> the table is not empty. Please help. Thanks
> Christina
Subscribe to:
Posts (Atom)