Monday, March 12, 2012

How block the insertion of NULLS in SQL Server 2000?

Hi,
How block the insertion of NULLS in SQL Server 2000'
I know that in Ms-Access 2000 there is this option in the setting options,
but I could not find in SQL Server 2000.
Thanks,
--
Vilmar Brazo de OliveiraVilmar,
Use NOT NULL, as in
CREATE TABLE validvalue
(
value VARCHAR(20) NOT NULL
)
Dinesh
SQL Server MVP
--
--
SQL Server FAQ at
http://www.tkdinesh.com
"Vilmar" <xx1122@.x1212x.com.jc> wrote in message
news:OddUs9KKEHA.2024@.TK2MSFTNGP11.phx.gbl...
> Hi,
> How block the insertion of NULLS in SQL Server 2000'
> I know that in Ms-Access 2000 there is this option in the setting options,
> but I could not find in SQL Server 2000.
> Thanks,
> --
>
> Vilmar Brazo de Oliveira
>|||CREATE TABLE <tablename>
(<columnname> <datatype> [NOT] NULL)
So for example, this allows NULLs:
CREATE TABLE A
(B int NULL)
...and this disallows them:
CREATE TABLE A
(B int NOT NULL)
"Vilmar" <xx1122@.x1212x.com.jc> wrote in message
news:OddUs9KKEHA.2024@.TK2MSFTNGP11.phx.gbl...
> Hi,
> How block the insertion of NULLS in SQL Server 2000'
> I know that in Ms-Access 2000 there is this option in the setting options,
> but I could not find in SQL Server 2000.
> Thanks,
> --
>
> Vilmar Brazo de Oliveira
>

No comments:

Post a Comment