How to create table in MariaDB?

14,553

Please Check Following query :

CREATE TABLE prg_config (
     `id` INT NOT NULL AUTO_INCREMENT,
     `name` VARCHAR(50) NULL DEFAULT '',
     `value` VARCHAR(50) NULL DEFAULT '',
     PRIMARY KEY (id)
)COLLATE='utf8_bin';
Share:
14,553
user1564141
Author by

user1564141

Updated on June 27, 2022

Comments

  • user1564141
    user1564141 almost 2 years

    When I try to create simple table via HeidiSQL I'm getting an error like this

    enter image description here

    CREATE TABLE `prg_config` (
        `id` INT NULL AUTO_INCREMENT,
        `name` VARCHAR(50) NULL DEFAULT '',
        `value` VARCHAR NULL DEFAULT ''
    ) COLLATE='utf8_bin';
    
  • Anse
    Anse over 8 years
    I fixed that in r5032 of HeidiSQL, so that you get an error message saying Column data type %s requires a length/set when you try to leave an empty length/set value for a VARCHAR column.