0

Table structure for table tbl_appointment

CREATE TABLE IF NOT EXISTS `tbl_appointment` (
`ap_id` int( 11 ) NOT NULL ,
`ap_starting` time( 6 ) NOT NULL ,
`ap_ending` time( 6 ) NOT NULL ,
`ap_day` varchar( 255 ) NOT NULL
) ENGINE = InnoDB DEFAULT CHARSET = latin1;

MySQL said: Documentation

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(6) NOT NULL, ap_ending time(6) NOT NULL, ap_day varchar(255) NOT NULL )' at line 9`

I tried to import the SQL file to phpmyadmin. the file works fine on later version of XAMPP from what I have. I tried to edit the SQL file based on the error but to no avail.

6
  • Could you post that code and error message as text please?
    – Tom V
    Oct 17, 2015 at 7:16
  • tried the same code and it worked on my side. tried it on mysql 5.6.26. Please also check mysql error log to see anything there as well? Oct 17, 2015 at 11:15
  • isn't these ``` the problem?
    – Racer SQL
    Oct 17, 2015 at 14:10
  • @RafaelPiccinelli i am not familiar with .sql file. i am a beginner,so i use phpmyadmin GUI. So, I posted the error i was given. Oct 17, 2015 at 14:55
  • @NawazSohail where do i find mysql error log. I think i have provided the error I got in phpmyadmin Oct 17, 2015 at 14:56

1 Answer 1

1

The microsecond fractional part of your DDL (I.e. The (6)) is only supported from MySQL 5.6 onward. Most likely a compatibility issue I'm afraid.

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.