forums › forums › SQLyog › SQLyog: Bugs / Feature Requests › Bug report: Error in update data with null
- This topic is empty.
-
AuthorPosts
-
-
April 17, 2003 at 6:33 am #7844luciano.pulvirentiMember
If update table with date = null after update the date is 00-00-0000.
In the zip i have documented the steps.
History reports:
[8.23.20][ 38 ms] update `Paghe`.`test` set `id`='2', `name`='Pippo', `date_nasc`='' where id='2'
The correct update is:
update `Paghe`.`test` set `id`='2', `name`='Pippo', `date_nasc`= Null where id='2'
Thanks 😡
-
April 17, 2003 at 8:55 am #14091RiteshMember
Hello
I created a sample table as shown in the images. The create table statement is given as –
Code:CREATE TABLE `test` ( Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
    `id` int(11) NOT NULL default '0',                                                  Â
    `name` char(20) default NULL,                                                    Â
    `date_nasc` date default NULL,                                                   Â
    PRIMARY KEY  (`id`)) TYPE=MyISAMUsing the Insert/Update window of SQLyog, the following SQL scripts are generated –
Code:insert into `test`.`test` ( `id`, `name`, `date_nasc` ) values (  '1',  'Luciano',  NULL );update `test`.`test` set  `id`='2',  `name`='Pitto',  `date_nasc`=NULL where id='1';
This is what I expect. Please check the create table stmt. of your table. To set a columns value NULL, set the
focus on the column and press Alt+N.
BTW, which version of SQLyog you are using?
-
April 17, 2003 at 9:25 am #14092luciano.pulvirentiMember
The problem is solved with 3.1 (i have for test 3.02)
Thanks
-
-
AuthorPosts
- You must be logged in to reply to this topic.