Re: can you insert null?

2003-06-26 Thread Keith C. Ivey
On 26 Jun 2003 at 15:01, danchik wrote:

> was the field type varchar? because it seems that no default varchars
> set the NULL or (NULL) as a literal "(NULL)" not a binary 0 for some
> reason.

You're confusing various meanings of "null".  NULL in SQL has nothing 
to do with binary 0 bytes (which would be represented as '\0' in 
MySQL SQL statements).

-- 
Keith C. Ivey <[EMAIL PROTECTED]>
Tobacco Documents Online
http://tobaccodocuments.org


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: can you insert null?

2003-06-26 Thread nospam
hm, no, it works fine with int and varchar(40)

 
-Ursprüngliche Nachricht- 
Von: "danchik" <[EMAIL PROTECTED]>
An: <[EMAIL PROTECTED]>
Gesendet: Freitag, 27. Juni 2003 00:01
Betreff: Re: can you insert null?


> was the field type varchar? because it seems that no default varchars set
> the NULL or (NULL) as a literal "(NULL)" not a binary 0 for some reason.
> 
> 
> - Original Message -
> From: <[EMAIL PROTECTED]>
> To: "danchik" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Thursday, June 26, 2003 2:31 PM
> Subject: Re: can you insert null?
> 
> 
> hm? i just did a little test on mysql 3.23.56-nt, and had no problems
> setting a null value on a null column having a default value other than
> null. it turned to be null, rather than the default value.
> 
> ··· yves at unclassified.de
> 
> 
> -Ursprüngliche Nachricht-
> Von: "danchik" <[EMAIL PROTECTED]>
> An: <[EMAIL PROTECTED]>
> Gesendet: Donnerstag, 26. Juni 2003 23:20
> Betreff: Re: can you insert null?
> 
> 
> > your statement will do just that, but make sure the field has no default
> > value and allows NULL
> >
> > - Original Message -
> > From: "Bill2" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, June 26, 2003 1:48 PM
> > Subject: can you insert null?
> >
> >
> > > Hello all,
> > >
> > > Does anyone know if you can put the value(not the string)  NULL?
> > >
> > > Something like
> > > UPDATE TABLE some_table SET field = NULL
> > >
> > >
> > > Thanks,
> > >
> > > Bill
> > >
> > >
> > > --
> > > MySQL General Mailing List
> > > For list archives: http://lists.mysql.com/mysql
> > > To unsubscribe:
> > http://lists.mysql.com/[EMAIL PROTECTED]
> > >
> > >
> >
> >
> > --
> > MySQL General Mailing List
> > For list archives: http://lists.mysql.com/mysql
> > To unsubscribe:
> http://lists.mysql.com/[EMAIL PROTECTED]
> >
> 
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
> 
> 
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
>

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: can you insert null?

2003-06-26 Thread danchik
I take that back about defaults, worked fine on all types... the earlier
test i did on varchar after inserting NULL i brought the field up in edit
mode and aparently the editor converted it to literal "(NULL)" from NULL
(maybe it thought to be smart with varchars) where as the actual stored
value was NULL


- Original Message -
From: "Paul DuBois" <[EMAIL PROTECTED]>
To: "danchik" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, June 26, 2003 2:31 PM
Subject: Re: can you insert null?


> At 14:20 -0700 6/26/03, danchik wrote:
> >your statement will do just that, but make sure the field has no default
> >value and allows NULL
>
> Why would it matter if it has a default value?
>
>
> >
> >- Original Message -
> >From: "Bill2" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Sent: Thursday, June 26, 2003 1:48 PM
> >Subject: can you insert null?
> >
> >
> >>  Hello all,
> >>
> >>  Does anyone know if you can put the value(not the string)  NULL?
> >>
> >>  Something like
> >>  UPDATE TABLE some_table SET field = NULL
> >>
> >>
> >>  Thanks,
> >>
> >  > Bill
>
>
> --
> Paul DuBois, Senior Technical Writer
> Madison, Wisconsin, USA
> MySQL AB, www.mysql.com
>
> Are you MySQL certified?  http://www.mysql.com/certification/
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]
>
>


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: can you insert null?

2003-06-26 Thread danchik
was the field type varchar? because it seems that no default varchars set
the NULL or (NULL) as a literal "(NULL)" not a binary 0 for some reason.


- Original Message -
From: <[EMAIL PROTECTED]>
To: "danchik" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, June 26, 2003 2:31 PM
Subject: Re: can you insert null?


hm? i just did a little test on mysql 3.23.56-nt, and had no problems
setting a null value on a null column having a default value other than
null. it turned to be null, rather than the default value.

··· yves at unclassified.de


-Ursprüngliche Nachricht-
Von: "danchik" <[EMAIL PROTECTED]>
An: <[EMAIL PROTECTED]>
Gesendet: Donnerstag, 26. Juni 2003 23:20
Betreff: Re: can you insert null?


> your statement will do just that, but make sure the field has no default
> value and allows NULL
>
> - Original Message -
> From: "Bill2" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, June 26, 2003 1:48 PM
> Subject: can you insert null?
>
>
> > Hello all,
> >
> > Does anyone know if you can put the value(not the string)  NULL?
> >
> > Something like
> > UPDATE TABLE some_table SET field = NULL
> >
> >
> > Thanks,
> >
> > Bill
> >
> >
> > --
> > MySQL General Mailing List
> > For list archives: http://lists.mysql.com/mysql
> > To unsubscribe:
> http://lists.mysql.com/[EMAIL PROTECTED]
> >
> >
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]
>

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: can you insert null?

2003-06-26 Thread Jake Johnson
Yes, that works for Teradata and Oracle as well.

Regards,
Jake Johnson
[EMAIL PROTECTED]

--
Plutoid - http://www.plutoid.com - Shop Plutoid for the best prices on
Rims, Car Audio, and Performance Parts.


On Thu, 26 Jun 2003 [EMAIL PROTECTED] wrote:

> hm? i just did a little test on mysql 3.23.56-nt, and had no problems setting a null 
> value on a null column having a default value other than null. it turned to be null, 
> rather than the default value.
>
> ··· yves at unclassified.de
>
>
> -Ursprüngliche Nachricht-
> Von: "danchik" <[EMAIL PROTECTED]>
> An: <[EMAIL PROTECTED]>
> Gesendet: Donnerstag, 26. Juni 2003 23:20
> Betreff: Re: can you insert null?
>
>
> > your statement will do just that, but make sure the field has no default
> > value and allows NULL
> >
> > - Original Message -
> > From: "Bill2" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, June 26, 2003 1:48 PM
> > Subject: can you insert null?
> >
> >
> > > Hello all,
> > >
> > > Does anyone know if you can put the value(not the string)  NULL?
> > >
> > > Something like
> > > UPDATE TABLE some_table SET field = NULL
> > >
> > >
> > > Thanks,
> > >
> > > Bill
> > >
> > >
> > > --
> > > MySQL General Mailing List
> > > For list archives: http://lists.mysql.com/mysql
> > > To unsubscribe:
> > http://lists.mysql.com/[EMAIL PROTECTED]
> > >
> > >
> >
> >
> > --
> > MySQL General Mailing List
> > For list archives: http://lists.mysql.com/mysql
> > To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
> >
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
>

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: can you insert null?

2003-06-26 Thread nospam
hm? i just did a little test on mysql 3.23.56-nt, and had no problems setting a null 
value on a null column having a default value other than null. it turned to be null, 
rather than the default value.

··· yves at unclassified.de

 
-Ursprüngliche Nachricht- 
Von: "danchik" <[EMAIL PROTECTED]>
An: <[EMAIL PROTECTED]>
Gesendet: Donnerstag, 26. Juni 2003 23:20
Betreff: Re: can you insert null?


> your statement will do just that, but make sure the field has no default
> value and allows NULL
> 
> - Original Message -
> From: "Bill2" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, June 26, 2003 1:48 PM
> Subject: can you insert null?
> 
> 
> > Hello all,
> >
> > Does anyone know if you can put the value(not the string)  NULL?
> >
> > Something like
> > UPDATE TABLE some_table SET field = NULL
> >
> >
> > Thanks,
> >
> > Bill
> >
> >
> > --
> > MySQL General Mailing List
> > For list archives: http://lists.mysql.com/mysql
> > To unsubscribe:
> http://lists.mysql.com/[EMAIL PROTECTED]
> >
> >
> 
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
>

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: can you insert null?

2003-06-26 Thread Paul DuBois
At 14:20 -0700 6/26/03, danchik wrote:
your statement will do just that, but make sure the field has no default
value and allows NULL
Why would it matter if it has a default value?


- Original Message -
From: "Bill2" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 26, 2003 1:48 PM
Subject: can you insert null?

 Hello all,

 Does anyone know if you can put the value(not the string)  NULL?

 Something like
 UPDATE TABLE some_table SET field = NULL
 Thanks,

 > Bill


--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
Are you MySQL certified?  http://www.mysql.com/certification/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: can you insert null?

2003-06-26 Thread danchik
your statement will do just that, but make sure the field has no default
value and allows NULL

- Original Message -
From: "Bill2" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 26, 2003 1:48 PM
Subject: can you insert null?


> Hello all,
>
> Does anyone know if you can put the value(not the string)  NULL?
>
> Something like
> UPDATE TABLE some_table SET field = NULL
>
>
> Thanks,
>
> Bill
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]
>
>


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: can you insert null?

2003-06-26 Thread Paul DuBois
At 13:48 -0700 6/26/03, Bill2 wrote:
Hello all,

Does anyone know if you can put the value(not the string)  NULL?

Something like
UPDATE TABLE some_table SET field = NULL
Sure.  If the column isn't defined as NOT NULL, anyway.

Why? Did you try this and get results you didn't expect?



Thanks,

Bill


--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
Are you MySQL certified?  http://www.mysql.com/certification/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


can you insert null?

2003-06-26 Thread Bill2
Hello all,

Does anyone know if you can put the value(not the string)  NULL?

Something like
UPDATE TABLE some_table SET field = NULL


Thanks,

Bill


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]