Null Defaults
am 17.12.2004 12:39:35 von Mark Mchugh
Hi Everybody,
Just a quick one...... if i have a number of fields
defined in a table, and there is data in the table,
and i want a default of null, is there any way to
change all empty values to null?
many thanks
__________________________________
Do you Yahoo!?
Jazz up your holiday email with celebrity designs. Learn more.
http://celebrity.mail.yahoo.com
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org
Re: Spam:Null Defaults
am 17.12.2004 12:44:21 von fabiomeira
At 09:39 17/12/2004, Mark Mchugh wrote:
>Hi Everybody,
>Just a quick one...... if i have a number of fields
>defined in a table, and there is data in the table,
>and i want a default of null, is there any way to
>change all empty values to null?
I didn't understand. If a field is empty then it's NULL, is not?
>many thanks
>
>
>
>
>__________________________________
>Do you Yahoo!?
>Jazz up your holiday email with celebrity designs. Learn more.
>http://celebrity.mail.yahoo.com
>
>--
>MySQL Windows Mailing List
>For list archives: http://lists.mysql.com/win32
>To=20
>unsubscribe: =
http://lists.mysql.com/win32?unsub=3Dfabiomeira@saocamilo-es .br
----------
F=E1bio L=FAcio Meira
Coordenador - Sistemas de Informação
Centro Universit=E1rio S=E3o Camilo
Esp=EDrito Santo - (28) 3526.5917=20
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org
Re: Null Defaults
am 17.12.2004 12:44:21 von Ignatius Reilly
UPDATE my_table
SET my_col = NULL
WHERE my_col LIKE ""
HTH
Ignatius
_________________________
----- Original Message -----
From: "Mark Mchugh"
To: "mysql list"
Sent: 17 December 2004 12:39
Subject: Null Defaults
> Hi Everybody,
> Just a quick one...... if i have a number of fields
> defined in a table, and there is data in the table,
> and i want a default of null, is there any way to
> change all empty values to null?
>
> many thanks
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Jazz up your holiday email with celebrity designs. Learn more.
> http://celebrity.mail.yahoo.com
>
> --
> MySQL Windows Mailing List
> For list archives: http://lists.mysql.com/win32
> To unsubscribe:
http://lists.mysql.com/win32?unsub=ignatius.reilly@free.fr
>
>
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org
Re: Spam:Null Defaults
am 17.12.2004 12:46:01 von Mark Mchugh
seems not to be in my database, when looking at it
through the mysql control center i just see blanks,
but when i add a record, then it will add NULL to the
field when there is not data
--- Fabio Lucio Meira
wrote:
> At 09:39 17/12/2004, Mark Mchugh wrote:
> >Hi Everybody,
> >Just a quick one...... if i have a number of fields
> >defined in a table, and there is data in the table,
> >and i want a default of null, is there any way to
> >change all empty values to null?
>
> I didn't understand. If a field is empty then it's
> NULL, is not?
>
> >many thanks
> >
> >
> >
> >
> >__________________________________
> >Do you Yahoo!?
> >Jazz up your holiday email with celebrity designs.
> Learn more.
> >http://celebrity.mail.yahoo.com
> >
> >--
> >MySQL Windows Mailing List
> >For list archives: http://lists.mysql.com/win32
> >To
> >unsubscribe:
>
http://lists.mysql.com/win32?unsub=fabiomeira@saocamilo-es.b r
>
>
> ----------
> Fábio Lúcio Meira
> Coordenador - Sistemas de Informação
> Centro Universitário São Camilo
> Espírito Santo - (28) 3526.5917
>
>
__________________________________
Do you Yahoo!?
Send holiday email and support a worthy cause. Do good.
http://celebrity.mail.yahoo.com
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org
Re: Spam:Re: Spam:Null Defaults
am 17.12.2004 12:50:22 von fabiomeira
At 09:46 17/12/2004, Mark Mchugh wrote:
>seems not to be in my database, when looking at it
>through the mysql control center i just see blanks,
>but when i add a record, then it will add NULL to the
>field when there is not data
Ok. But at canonic specification of Data Bases (you coulde see at=20
Elmasri/Navathe, Date, or Korth)
a Null field is a empty field. I think that this is just the way that the=20
GUI of MySQL works on Null fields.
>--- Fabio Lucio Meira
>wrote:
>
> > At 09:39 17/12/2004, Mark Mchugh wrote:
> > >Hi Everybody,
> > >Just a quick one...... if i have a number of fields
> > >defined in a table, and there is data in the table,
> > >and i want a default of null, is there any way to
> > >change all empty values to null?
> >
> > I didn't understand. If a field is empty then it's
> > NULL, is not?
> >
> > >many thanks
> > >
> > >
> > >
> > >
> > >__________________________________
> > >Do you Yahoo!?
> > >Jazz up your holiday email with celebrity designs.
> > Learn more.
> > >http://celebrity.mail.yahoo.com
> > >
> > >--
> > >MySQL Windows Mailing List
> > >For list archives: http://lists.mysql.com/win32
> > >To
> > >unsubscribe:
> >
>http://lists.mysql.com/win32?unsub=3Dfabiomeira@saocamilo-e s.br
> >
> >
> > ----------
> > F=E1bio L=FAcio Meira
> > Coordenador - Sistemas de Informação
> > Centro Universit=E1rio S=E3o Camilo
> > Esp=EDrito Santo - (28) 3526.5917
> >
> >
>
>
>
>
>__________________________________
>Do you Yahoo!?
>Send holiday email and support a worthy cause. Do good.
>http://celebrity.mail.yahoo.com
----------
F=E1bio L=FAcio Meira
Coordenador - Sistemas de Informação
Centro Universit=E1rio S=E3o Camilo
Esp=EDrito Santo - (28) 3526.5917=20
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org
Re: Spam:Null Defaults
am 17.12.2004 12:52:17 von Ignatius Reilly
No.
Ignatius
_________________________
----- Original Message -----
From: "Fabio Lucio Meira"
To: "Mark Mchugh" ; "mysql list"
Sent: 17 December 2004 12:44
Subject: Re: Spam:Null Defaults
At 09:39 17/12/2004, Mark Mchugh wrote:
>Hi Everybody,
>Just a quick one...... if i have a number of fields
>defined in a table, and there is data in the table,
>and i want a default of null, is there any way to
>change all empty values to null?
I didn't understand. If a field is empty then it's NULL, is not?
>many thanks
>
>
>
>
>__________________________________
>Do you Yahoo!?
>Jazz up your holiday email with celebrity designs. Learn more.
>http://celebrity.mail.yahoo.com
>
>--
>MySQL Windows Mailing List
>For list archives: http://lists.mysql.com/win32
>To
>unsubscribe:
http://lists.mysql.com/win32?unsub=fabiomeira@saocamilo-es.b r
----------
Fábio Lúcio Meira
Coordenador - Sistemas de Informação
Centro Universitário São Camilo
Espírito Santo - (28) 3526.5917
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe:
http://lists.mysql.com/win32?unsub=ignatius.reilly@free.fr
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org
Re: Spam:Re: Spam:Null Defaults
am 17.12.2004 12:57:58 von fabiomeira
"The NULL value can be surprising until you get used to it. Conceptually,=20
NULL means missing value or unknown value and it is treated somewhat=20
differently than other values. " --> NULL definition from MySQL=20
manual.html in docs
At 09:52 17/12/2004, Ignatius Reilly wrote:
>No.
>
>Ignatius
>_________________________
>----- Original Message -----
>From: "Fabio Lucio Meira"
>To: "Mark Mchugh" ; "mysql list"=
>Sent: 17 December 2004 12:44
>Subject: Re: Spam:Null Defaults
>
>
>At 09:39 17/12/2004, Mark Mchugh wrote:
> >Hi Everybody,
> >Just a quick one...... if i have a number of fields
> >defined in a table, and there is data in the table,
> >and i want a default of null, is there any way to
> >change all empty values to null?
>
>I didn't understand. If a field is empty then it's NULL, is not?
>
> >many thanks
> >
> >
> >
> >
> >__________________________________
> >Do you Yahoo!?
> >Jazz up your holiday email with celebrity designs. Learn more.
> >http://celebrity.mail.yahoo.com
> >
> >--
> >MySQL Windows Mailing List
> >For list archives: http://lists.mysql.com/win32
> >To
> >unsubscribe:
>http://lists.mysql.com/win32?unsub=3Dfabiomeira@saocamilo-e s.br
>
>
>----------
>F=E1bio L=FAcio Meira
>Coordenador - Sistemas de Informação
>Centro Universit=E1rio S=E3o Camilo
>Esp=EDrito Santo - (28) 3526.5917
>
>
>--
>MySQL Windows Mailing List
>For list archives: http://lists.mysql.com/win32
>To unsubscribe:
>http://lists.mysql.com/win32?unsub=3Dignatius.reilly@free.f r
----------
F=E1bio L=FAcio Meira
Coordenador - Sistemas de Informação
Centro Universit=E1rio S=E3o Camilo
Esp=EDrito Santo - (28) 3526.5917=20
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org
Re: Null Defaults
am 17.12.2004 15:33:53 von SGreen
--=_alternative 0050397485256F6D_=
Content-Type: text/plain; charset="US-ASCII"
Your question is easily misunderstood. Do you want to change an existing
row of data so that several columns have null values:
http://dev.mysql.com/doc/mysql/en/UPDATE.html
UPDATE mytable
SET nullable1 = null,
SET nullable2 = null,
SET nullable3 = null,
....,
SET nullableN = null
WHERE keycolumn = somevalue;
OR do you want to insert new records where you don't provide several
columns an initial value (allow them to be their default, NULL values):
http://dev.mysql.com/doc/mysql/en/INSERT.html
INSERT mytable (nonnull1, nonnull2, nonnull3)
VALUES (somevalue1, somevalue2, somevalue3);
OR is your situation something else?
Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine
Mark Mchugh wrote on 12/17/2004 06:39:35 AM:
> Hi Everybody,
> Just a quick one...... if i have a number of fields
> defined in a table, and there is data in the table,
> and i want a default of null, is there any way to
> change all empty values to null?
>
> many thanks
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Jazz up your holiday email with celebrity designs. Learn more.
> http://celebrity.mail.yahoo.com
>
> --
> MySQL Windows Mailing List
> For list archives: http://lists.mysql.com/win32
> To unsubscribe: http://lists.mysql.com/win32?unsub=sgreen@unimin.com
>
--=_alternative 0050397485256F6D_=--
Re: Spam:Null Defaults
am 18.12.2004 09:18:25 von Dijital
An blank record field in MySQL Control Center is not null, it is called
a zero-length string, or it may contain spaces, ie; chr(32). A true null
field is a missing or unknown value. MySQL Control Center will show
[NULL] when the field is actually null otherwise a zero-length string
appears as blank.
To change zero-length strings to null values in a column you can use a
query such as:
UPDATE database_name.table_name SET column_name=null WHERE column_name='';
The '' is 2 apostrophes, not a double quotes. Cheers.
Armando
Fabio Lucio Meira wrote:
> At 09:39 17/12/2004, Mark Mchugh wrote:
>
>> Hi Everybody,
>> Just a quick one...... if i have a number of fields
>> defined in a table, and there is data in the table,
>> and i want a default of null, is there any way to
>> change all empty values to null?
>
>
> I didn't understand. If a field is empty then it's NULL, is not?
>
>> many thanks
>>
>>
>>
>>
>> __________________________________
>> Do you Yahoo!?
>> Jazz up your holiday email with celebrity designs. Learn more.
>> http://celebrity.mail.yahoo.com
>>
>> --
>> MySQL Windows Mailing List
>> For list archives: http://lists.mysql.com/win32
>> To unsubscribe:
>> http://lists.mysql.com/win32?unsub=fabiomeira@saocamilo-es.b r
>
>
>
> ----------
> Fábio Lúcio Meira
> Coordenador - Sistemas de Informação
> Centro Universitário São Camilo
> Espírito Santo - (28) 3526.5917
>
--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org