default field values

I am trying to devise a procedure to delete rows wherein all the fields have
been set to their default values (either null, or in the case of a not null
default value for a row, that default value). Is there a means in MySQL
which allows me to obtain what the defaults are for all fields in a table?
Thanks, Ike
Ike [ Do, 15 Juni 2006 13:39 ] [ ID #1356388 ]

Re: default field values

"Ike" <rxv [at] hotmail.com> wrote in message
news:XFbkg.13196$921.2652 [at] newsread4.news.pas.earthlink.net.. .
>I am trying to devise a procedure to delete rows wherein all the fields
>have been set to their default values (either null, or in the case of a not
>null default value for a row, that default value). Is there a means in
>MySQL which allows me to obtain what the defaults are for all fields in a
>table? Thanks, Ike
>

"Describe " + tablename
....will give a resultset with this information //Ike
Ike [ Do, 15 Juni 2006 14:16 ] [ ID #1356389 ]

Re: default field values

"Ike" <rxv [at] hotmail.com> wrote in message
news:XFbkg.13196$921.2652 [at] newsread4.news.pas.earthlink.net.. .
> I am trying to devise a procedure to delete rows wherein all the fields
have
> been set to their default values (either null, or in the case of a not
null
> default value for a row, that default value). Is there a means in MySQL
> which allows me to obtain what the defaults are for all fields in a table?
> Thanks, Ike
>
>

The function: DEFAULT(col_name) returns the default value.However, what if
the value was set by the app or by the user and it just happens to be the
same as the default value? Do you really want to delete it?

Rich
Rich R [ Fr, 16 Juni 2006 20:02 ] [ ID #1357860 ]
Datenbanken » mailing.database.mysql » default field values

Vorheriges Thema: Complex Query over two Databases..
Nächstes Thema: canceled mysql 5 install, can't access databases