I’m a beginner and have no idea what to do!
This is clearly not working
I’m using phpmyadmin importing code manually by hand from postgresql
CREATE TABLE IF NOT EXISTS CUSTOMER (
CUSTID NUMERIC(6) NOT NULL,
NAME CHAR (45),
ADDRESS CHAR (40),
CITY CHAR (30),
STATE CHAR (2),
ZIP CHAR (9),
AREA NUMERIC(3),
PHONE CHAR (9),
REPID NUMERIC(4) NOT NULL,
CREDITLIMIT NUMERIC(9,2),
COMMENTS TEXT,
CONSTRAINT CUSTOMER_PRIMARY_KEY PRIMARY KEY (CUSTID));
USE CUSTOMERS
CONSTRAINT CUSTID_ZERO CHECK (CUSTID > 0)
SQL query:
USE CUSTOMERS
CONSTRAINT CUSTID_ZERO CHECK (CUSTID > 0)
MySQL said: Documentation
2
Answers
you don’t need the last line,
Because when you declared CUSTID you already mentioned NOT NULL
Changê you query to