Hello I am an IT student working on my final project for my database course. I am very new to Mysql so please bear with me.
I have to work with SQL Fiddle for the final project, and i have come across an issue I have no idea what to do about. When I create my tables i get a return of Wrong table name. here is the coding.
CREATE TABLE IF NOT EXISTS donut (
donutid INT NOT NULL auto_increment,
name VARCHAR(45) NOT NULL,
description VARCHAR (255) NULL DEFAULT NULL,
price DECIMAL(4,2) NOT NULL,
PRIMARY KEY (donutid));
CREATE TABLE IF NOT EXISTS customer (
custid INT NOT NULL auto_increment,
fname VARCHAR(45) NOT NULL,
lname VARCHAR(45) NOT NULL,
street VARCHAR(45) NOT NULL,
apt VARCHAR(45) NULL DEFAULT NULL,
state VARCHAR(2) NOT NULL,
zip INTEGER NOT NULL,
homep INTEGER(10) NULL DEFAULT NULL,
workp INTEGER(10) NULL DEFAULT NULL,
mobilep INTEGER(10) NULL DEFAULT NULL,
PRIMARY KEY (custid));
CREATE TABLE IF NOT EXISTS saleorder (
soid INTEGER NOT NULL auto_increment,
specialnotes VARCHAR (50) NULL DEFAULT NULL,
date DATETIME NOT NULL,
customer.custid INTEGER NOT NULL,
PRIMARY KEY (soid),
CONSTRAINT fk.saleorder.customer1
FOREIGN KEY (cust.custid)
ON DELETE no action
ON UPDATE no action);
any assistance or explanation would be helpful.