gpt4 book ai didi

SQL 错误 : ORA-00906: missing left parenthesis 00906. 00000 - "missing left parenthesis"

转载 作者:搜寻专家 更新时间:2023-10-30 20:20:34 35 4
gpt4 key购买 nike

CREATE TABLE customer(customer_id NUMBER(6) PRIMARY KEY
, customer_name VARCHAR2(40) NOT NULL
, customer_address VARCHAR2(60) NOT NULL
, customer_email VARCHAR2(35)
, customer_number NUMBER (11) NOT NULL CHECK LENGTH(customer_number) = 11)

这只是开玩笑,我不明白哪里出了问题

最佳答案

您没有指定约束名称,我相信您需要在括号中包含检查约束:

, customer_number NUMBER (11) NOT NULL 
constraint custnumlen CHECK (LENGTH(customer_number) = 11))

看看http://www.techonthenet.com/oracle/check.php

关于SQL 错误 : ORA-00906: missing left parenthesis 00906. 00000 - "missing left parenthesis",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8424456/

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com