Skip to content
Advertisement

Why this IF NOT EXISTS statement is not ok?

I’m trying to create a table but it keeps giving me error and I’m not able to figure out the problem even after checking the manual That’s the code:

CREATE TABLE IF NOT EXISTS table1
(ID BIGINT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY,
NAME VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_cI NOT NULL,
VALUE INT(11) NOT NULL,
ATTACHMENT TEXT NULL DEFAULT NULL)

Advertisement

Answer

I solved by using a different word from VALUE. It is already defined as keyword

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement