0

Talk person, all right? Well, I have a problem with my first application – I'm new to DB – of my database as a whole. When I click create data it gives me a huge error and unfortunately it doesn't apply what I want. I'll leave the code for you to help me if possible.

Segue:

código CREATE TABLEdbtestesestudos.cliente(N_CLIENTE_CLIENTEINT NOT NULL, UNIQUE INDEXN_CLIENTE_CLIENTE_UNIQUE (N_CLIENTE_CLIENTE ASC) VISIBLE, PRIMARY KEY (N_CLIENTE_CLIENTE)) ENGINE = InnoDB DEFAULT CHARACTER SET = utf8;

error Operation failed: There was an error while applying the SQL script to the database. Executing: CREATE TABLE dbtestesestudos.cliente(N_CLIENTE_CLIENTEINT NOT NULL, UNIQUE INDEXN_CLIENTE_CLIENTE_UNIQUE (N_CLIENTE_CLIENTE ASC) VISIBLE, PRIMARY KEY (N_CLIENTE_CLIENTE`)) ENGINE = InnoDB DEFAULT CHARACTER SET = utf8;

ERROR 1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ' PRIMARY KEY (N_CLIENTE_CLIENTE)) ENGINE = InnoDB DEFAULT CHARACTER SET =...' at line 3 SQL Statement: CREATE TABLE dbtestesestudos.cliente ( N_CLIENTE_CLIENTE INT NOT NULL, UNIQUE INDEX N_CLIENTE_CLIENTE_UNIQUE (N_CLIENTE_CLIENTE ASC) VISIBLE, PRIMARY KEY (N_CLIENTE_CLIENTE)) ENGINE = InnoDB DEFAULT CHARACTER SET = utf8 `

Well, I tried to create, as said, a first application in mysql but this error is appearing and I don't know how to solve it.

Bill Karwin
  • 538,548
  • 86
  • 673
  • 828
Imagem
  • 1
  • 1
  • If you're just starting out, let me give you a tip that will save you a lot of time: **MariaDB is not MySQL.** MariaDB started as a fork of MySQL in 2010, but both products have changed since then. MariaDB is no longer compatible with MySQL. You need to think of them as different products. Don't expect their dialect of SQL to be the same. If you use MariaDB, you should read only MariaDB documentation and use only MariaDB code examples. If you use MySQL, read MySQL documentation and use MySQL code examples. – Bill Karwin Jan 28 '23 at 19:09
  • This URL for mariadb may help you with your current activity. https://www.mariadbtutorial.com/mariadb-basics/mariadb-create-table/ and followed by this educational material for MariaDB https://mariadb.com/kb/en/setting-character-sets-and-collations/ – Wilson Hauck Jan 28 '23 at 19:49

0 Answers0