小编Las*_*ser的帖子

ORA-02291 错误。不确定是什么导致了问题

一切运行良好。结束部分给出ORA-02291错误。不确定是什么导致了该错误,因为我认为所有代码都运行良好。这是在 Oracle SQL developer 中制作的,错误消息是 ORA-02291。我希望有人能给我一个答案。请帮我。

代码:


CREATE TABLE comm_customer
( 
Customer_Id int NOT NULL,
Customer_Name VARCHAR(50) NOT NULL,
Address VARCHAR(255) NOT NULL,
Billing_Address VARCHAR(255) NOT NULL,
city VARCHAR(255) NOT NULL,
country VARCHAR(255) NOT NULL, 
phone INT NOT NULL,
primary key(Customer_id)
);

CREATE TABLE comm_orders
(
order_Id INT NOT NULL,
Customer_id INT NOT NULL,
order_date DATE NOT NULL,
amount DECIMAL(5,2) NOT NULL,
Order_status VARCHAR(20) NOT NULL,
primary key(order_id),
FOREIGN KEY (customer_id ) REFERENCES comm_customer(customer_id)
);

CREATE TABLE comm_products …
Run Code Online (Sandbox Code Playgroud)

sql oracle constraints foreign-keys

-1
推荐指数
1
解决办法
50
查看次数

标签 统计

constraints ×1

foreign-keys ×1

oracle ×1

sql ×1