Redian新闻
>
another question--怎么delete a row from a table
avatar
another question--怎么delete a row from a table# Database - 数据库
w*g
1
other talbes have foreign key referrence to some attribute of this table. So if
I just use delete from...,I will get a msg like this:
ORA-02292: integrity constraint (WGUAN.SYS_C0061954) violated - child
record found
I tried to drop the foreign key in those tables using:
DROP FOREIGN KEY (***) REFENERRENCES tablename (**)
error msg:
ORA-00905: missing keyword
What should I do? Thanks.
avatar
T*e
2
ft, 1 more.
I am not a DBA. Just know some basic stuff.

Is the grammar correct?

【在 w*g 的大作中提到】
: other talbes have foreign key referrence to some attribute of this table. So if
: I just use delete from...,I will get a msg like this:
: ORA-02292: integrity constraint (WGUAN.SYS_C0061954) violated - child
: record found
: I tried to drop the foreign key in those tables using:
: DROP FOREIGN KEY (***) REFENERRENCES tablename (**)
: error msg:
: ORA-00905: missing keyword
: What should I do? Thanks.

avatar
w*g
3

much better than me:)
dunno. I used it under ALTER TABLE ***
If this is not correct, how to do it?

【在 T**e 的大作中提到】
: ft, 1 more.
: I am not a DBA. Just know some basic stuff.
:
: Is the grammar correct?

avatar
T*e
4
hmm, what DB are you using? any online help?
On most occasion, I goto online help
copy&paste example, and modify it

【在 w*g 的大作中提到】
:
: much better than me:)
: dunno. I used it under ALTER TABLE ***
: If this is not correct, how to do it?

avatar
w*g
5
I am using Oracle. Any online help in its website?

【在 T**e 的大作中提到】
: hmm, what DB are you using? any online help?
: On most occasion, I goto online help
: copy&paste example, and modify it

avatar
T*e
6
On UNIX, or NT?
If NT, tons of online help ( no need to goto www )

【在 w*g 的大作中提到】
: I am using Oracle. Any online help in its website?
avatar
a*a
7
I don't know Oracle - but in MS SQL Server, it would be:
ALTER TABLE
DROP CONSTRAINT
avatar
zh
8
You must drop the FK constraint first by
ALTER TABLE table_name
DROP CONSTRAINT constraint_name

【在 w*g 的大作中提到】
: other talbes have foreign key referrence to some attribute of this table. So if
: I just use delete from...,I will get a msg like this:
: ORA-02292: integrity constraint (WGUAN.SYS_C0061954) violated - child
: record found
: I tried to drop the foreign key in those tables using:
: DROP FOREIGN KEY (***) REFENERRENCES tablename (**)
: error msg:
: ORA-00905: missing keyword
: What should I do? Thanks.

avatar
zh
9
same thing in oracle.

【在 a*****a 的大作中提到】
: I don't know Oracle - but in MS SQL Server, it would be:
: ALTER TABLE
: DROP CONSTRAINT

avatar
w*g
10
I tried drop fk, but failed.
I used this:
ALTER TABLE ***
DISABLE PRIMARY KEY CONCADE;
it works

【在 zh 的大作中提到】
: You must drop the FK constraint first by
: ALTER TABLE table_name
: DROP CONSTRAINT constraint_name

avatar
T*e
11
兄弟,没有another question了?

【在 w*g 的大作中提到】
: I tried drop fk, but failed.
: I used this:
: ALTER TABLE ***
: DISABLE PRIMARY KEY CONCADE;
: it works

avatar
w*g
12
下次作业还没有布置,hehe

【在 T**e 的大作中提到】
: 兄弟,没有another question了?
avatar
T*e
13
俺记得97年俺上SMTH时泥是什么advancedEdu的BM?
怎么,也是CHEM转CS?

【在 w*g 的大作中提到】
: 下次作业还没有布置,hehe
avatar
w*g
14
不会吧.我虽然上过SMTH可从来没当过什么BM啊
只是选了门课21

【在 T**e 的大作中提到】
: 俺记得97年俺上SMTH时泥是什么advancedEdu的BM?
: 怎么,也是CHEM转CS?

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。