vani
unread,Nov 14, 2011, 2:33:41 AM11/14/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to H2 Database
Is there is any way to change the default character set to latin1.
When I am trying to execute the below query
CREATE TABLE `messageTypeColor` (
`userId` INT NOT NULL,
`messageType` VARCHAR(45) CHARACTER SET latin1 COLLATE latin1_bin
NOT NULL,
`foreground` VARCHAR(45) NOT NULL,
`background` VARCHAR(45) NOT NULL,
PRIMARY KEY (`userId`, `messageType`),
CONSTRAINT `fk_userid_messagetypecolor` FOREIGN KEY (`userId`)
REFERENCES `user` (`userId`)
ON DELETE CASCADE
) ;
I am getting the error as below
ERROR: Syntax error in SQL statement "CREATE TABLE
""MESSAGETYPECOLOR""
(
""USERID"" INT NOT NULL,
""MESSAGETYPE"" VARCHAR(45)
CHARACTER[*] SET LATIN1 COLLATE LATIN1_BIN NOT NULL,
""FOREGROUND"" VARCHAR(45) NOT NULL,
""BACKGROUND"" VARCHAR(45)
NOT NULL,
PRIMARY KEY (""USERID"", ""MESSAGETYPE""),
CONSTRAINT ""FK_USERID_MESSAGETYPECOLOR"" FOREIGN KEY
(""USERID"")
REFERENCES ""USER"" (""USERID"")
ON DELETE
CASCADE
) ; "; expected ")"; SQL statement: