SHOW VARIABLES LIKE "%CHAR%";
CREATE DATABASE IF NOT EXISTS test;
USE test;

CREATE OR REPLACE TABLE table_coupon_defaulttime (
  coupon_no varchar(10) NOT NULL DEFAULT '',
  memo varchar(30) DEFAULT NULL,
  discount double DEFAULT NULL,
  KAISHI_BI datetime NOT NULL default '0000-00-00 00:00:00',
  PRIMARY KEY (coupon_no)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
INSERT INTO table_coupon_defaulttime VALUES ('1','ＡＢＣ',250,'2014-01-01 12:00'),('2','ＤＥ Ｆ',200,'2014-05-01 08:00'),('3','ＧＨＩ',300,NULL);
SELECT * FROM table_coupon_defaulttime;

CREATE OR REPLACE TABLE table_coupon_nodefaulttime (
  coupon_no varchar(10) NOT NULL DEFAULT '',
  memo varchar(30) DEFAULT NULL,
  discount double DEFAULT NULL,
  KAISHI_BI datetime NOT NULL,
  PRIMARY KEY (coupon_no)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
INSERT INTO table_coupon_nodefaulttime  VALUES ('1','ＡＢＣ',250,'2014-01-01 12:00'),('2','ＤＥ Ｆ',200,'2014-05-01 08:00'),('3','ＧＨＩ',300,NULL);
SELECT * FROM table_coupon_nodefaulttime ;

GRANT ALL ON test.* TO 'root'@'10.0.1.33';
