Start a new topic

Cant create table in MariaDB and latest version pf DBVisualizer

I cant create a table containing:


CREATE TABLE

    `pdf_search`.newtable

    (

        INDEX BIGINT UNSIGNED NOT NULL,

        col2 VARCHAR(50) NOT NULL,

              text MEDIUMTEXT NOT NULL

    )

    ENGINE=InnoDB DEFAULT CHARSET=utf8mb4


I think there is a problem in DBVisualizer using the BIGINT UNSIGNED?

There is no problem, if I am going to use HeidiSQL for the creation of the table



1 Comment

Hi Rainer,

INDEX is a reserved word in MariaDB, I don't quite understand how HeidiSQL manages to create a column with this name. 
However, if I quote the name using backticks, I can create the table:
DROP TABLE IF EXISTS newtable;
CREATE TABLE
    newtable
    (
        `INDEX` BIGINT UNSIGNED NOT NULL,
        col2 VARCHAR(50) NOT NULL,
              text MEDIUMTEXT NOT NULL
    )
    ENGINE=InnoDB DEFAULT CHARSET=utf8mb4

Hope this helps?

Kind Regards, 

Peer

---
Peer Törngren
DbVis Software
Stockholm, Sweden

Our products help over 25,000 customers in 145 countries

Login or Signup to post a comment