Ads were blocked by your webbrowser.

This is not a problem, but keep in mind that developing HeidiSQL, user support and hosting takes time and money.

You may want to send a donation instead.

Invalid default value for type DATE '0000-00-00'

adyoi's profile image adyoi posted 3 weeks ago in General

Invalid default value for type DATE '0000-00-00'

adyoi's profile image adyoi posted 3 weeks ago

10.3.16-MariaDB

adyoi's profile image adyoi posted 4 days ago

invalid default value

DATE DATETIME TIMESTAMP



Ads were blocked by your webbrowser.

This is not a problem, but keep in mind that developing HeidiSQL, user support and hosting takes time and money.

You may want to send a donation instead.
ansgar's profile image ansgar posted 4 days ago

Please write in whole sentences, and describe what you were doing.

adyoi's profile image adyoi posted 3 days ago

Please write in whole sentences, and describe what you were doing.

create new table and update table with default value '0000-00-00'

adyoi's profile image adyoi posted 3 days ago

screenshot

1 attachment(s):
  • err
ansgar's profile image ansgar posted 3 days ago

Not sure why the server rejects that change. I just could successfully do the same on MariaDB 10.3.12:

ALTER TABLE `test`
    CHANGE COLUMN `d` `d` DATE NOT NULL DEFAULT '0000-00-00' AFTER `Mt`;

'0000-00-00' is not allowed in TRADITIONAL/NO_ZERO_DATE SQL mode. Perhaps you have activated that.

adyoi's profile image adyoi posted 2 days ago

Not sure why the server rejects that change. I just could successfully do the same on MariaDB 10.3.12:

ALTER TABLE `test`
  CHANGE COLUMN `d` `d` DATE NOT NULL DEFAULT '0000-00-00' AFTER `Mt`;

'0000-00-00' is not allowed in TRADITIONAL/NO_ZERO_DATE SQL mode. Perhaps you have activated that.

fix with sql mode

SET GLOBAL sql_mode = 'NO_ENGINE_SUBSTITUTION'; SET SESSION sql_mode = 'NO_ENGINE_SUBSTITUTION';

Please login to leave a reply, or register at first.