I am trying to create a table using MySQL and MariaDB, what is wrong with my syn
ID: 3849503 • Letter: I
Question
I am trying to create a table using MySQL and MariaDB, what is wrong with my syntax in trying to create this table?
Welcome to the MariaDB monitor. Commands end with or Ig. Your MySQL connection id is 43 Server version: 5.7.18 Honebrew Copyright (c) 2000, 2017, oracle, MariaDB Corporation Ab and others. Type 'help or 'Ih' for help. Type 'Ic' to clear the current input statement. [MySQL (none) CREATE DATABASE TESTING Query OK, 1 row affected (0.00 sec) [MySQL [(none) USE TESTING Database changed [MySQL [TESTING] CREATE TABLE PERSONS > ERROR 1064 (42000) You have an error in your SQL syntax; check the manual that c orresponds to your MySQL server version for the right syntax to use near at line 1 MySQL [TESTING]Explanation / Answer
Syntax
CREATE TABLE TABLE_NAME(COLUMN_NAME COLUMN_TYPE);
Change your Query To
CREATE TABLE PERSONS (
PERS_ID NOT NULL,
PERS_NAME VARCHAR(45),
PRIMARY KEY(PERS_ID));
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.