CREATE DATABASE store;
use store;
CREATE TABLE categories(category_id INT NOT NULL,category_name VARCHAR(50),PRIMARY KEY(category_id));
CREATE TABLE products(product_id INT NOT NULL,category_id INT NOT NULL,model_number VARCHAR(50),model_name VARCHAR(50),
product_image VARCHAR(50),unit_cost DECIMAL,description TEXT,FOREIGN KEY(category_id) REFERENCES categories(category_id));
时间: 2024-10-12 12:06:42