主键约束 [英] Primary Key Constraint

查看:62
本文介绍了主键约束的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿伙计们。这是与学校有关的问题。我的实验室说如下:


1.添加新的供应商表

a。有关字段和数据类型,请参见上表

b。使用您的用户名作为表定义,即userid.Vendor,而不是Demo

c。添加主键ProductNo作为约束


好​​的,我创建了包含字段和数据类型的表。现在当我去添加带约束的主键时,我在第2行得到了

错误:

ORA-00904:VENDOR_NO:无效的标识符


当我输入:

展开 | 选择 | Wrap | 行号

解决方案

已移至Oracle论坛。

查看此发布


您好,


如果您在此论坛发布aqny代码,请使用代码标签


Th anks

MODERATOR



嘿伙计们。这是与学校有关的问题。我的实验室说如下:


1.添加新的供应商表

a。有关字段和数据类型,请参见上表

b。使用您的用户名作为表定义,即userid.Vendor,而不是Demo

c。添加主键ProductNo作为约束


好​​的,我创建了包含字段和数据类型的表。现在当我去添加带约束的主键时,我在第2行得到了

错误:

ORA-00904:VENDOR_NO:无效的标识符


当我输入:

展开 | 选择 | Wrap | 行号


Hey guys. This is a school related question. My lab says the following:

1. Add a new Vendor table
a. See table above for fields and data types
b. Use your username as the table definition, i.e., userid.Vendor, instead of Demo
c. Add Primary key ProductNo as a Constraint

Okay, I created the table with the fields and data types. Now when I go to add the primary key with the constraint and I get
ERROR at line 2:
ORA-00904: "VENDOR_NO": invalid identifier

When I enter:

Expand|Select|Wrap|Line Numbers

解决方案

Moved to Oracle Forum.
Checkout this post.


Hi,

Please make use of code tags when ever you post aqny code in this forum

Thanks
MODERATOR


Hey guys. This is a school related question. My lab says the following:

1. Add a new Vendor table
a. See table above for fields and data types
b. Use your username as the table definition, i.e., userid.Vendor, instead of Demo
c. Add Primary key ProductNo as a Constraint

Okay, I created the table with the fields and data types. Now when I go to add the primary key with the constraint and I get
ERROR at line 2:
ORA-00904: "VENDOR_NO": invalid identifier

When I enter:

Expand|Select|Wrap|Line Numbers


这篇关于主键约束的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆