the code for creating table is given below while i try to import this table in new database am getting the following error
Query
CREATE TABLE IF NOT EXISTS `blogs` (
`blog_id` int(10) NOT NULL AUTO_INCREMENT,
`blog_title` text NOT NULL,
`blog_content` text NOT NULL,
`created_on` datetime(6) NOT NULL,
`created_by` int(20) NOT NULL,
`updated_on` datetime(6) NOT NULL,
`updated_by` int(20) NOT NULL,
PRIMARY KEY (`blog_id`)
) Engine=InnoDB AUTO_INCREMENT=14 ;
error:#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,
created_by
int(20) NOT NULL,updated_on
datetime(6) NOT NU' at line 11
kindly guide me to solve this issues still i need to import many tables
A collation specifies the bit patterns that represent each character in a dataset. Collations also determine the rules that sort and compare data. SQL Server supports storing objects that have different collations in a single database.
So what is an "illegal mix of collations"? An "illegal mix of collations" occurs when an expression compares two strings of different collations but of equal coercibility and the coercibility rules cannot help to resolve the conflict.
Collation refers to a set of rules that determine how data. is sorted and compared. Character data is sorted using rules that define the. correct character sequence, with options for specifying case-sensitivity, accent. marks, kana character types and character width.
Remove length (6) from datetime(6)
.
So your query would look something like this,
CREATE TABLE IF NOT EXISTS `blogs` (
`blog_id` int(10) NOT NULL AUTO_INCREMENT,
`blog_title` text NOT NULL,
`blog_content` text NOT NULL,
`created_on` datetime NOT NULL,
`created_by` int(20) NOT NULL,
`updated_on` datetime NOT NULL,
`updated_by` int(20) NOT NULL,
PRIMARY KEY (`blog_id`)
) Engine=InnoDB AUTO_INCREMENT=14 ;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With