In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
How to find out which table the foreign key is built on
Sometimes when deleting a table record, it will report an error that the foreign key constraint cannot be deleted.
If you do not understand the relationship between tables, you can query the table on which the foreign key is built by using the following statement:
Select * from dba_constraints where constraint_name='xxx' and constraint_type ='R'
For example, the following error is reported in my program log. I want to know which table the foreign key is on.
2015-09-08 18:28:18 [main:261597003]-[ERROR] java.sql.SQLException: ORA-02291: violation of complete constraint (IRP.FK66EC57AF5158B9FB)-parent keyword not found
Select * from dba_constraints where constraint_name='FK66EC57AF5158B9FB' and constraint_type ='R'
For example:
Execution of delete from tablename Times error:
ORA-02292: integrity constraint (CCSYS.FK_T_BME_TASKRUNRESULT_TASKID) violated-child record found
You can do this by executing
Select table_name from dba_constraints where constraint_name='FK_T_BME_TASKRUNRESULT_TASKID' and constraint_type ='R'
Query that the foreign key is built on the T_BME_TASKRUNRESULT table, delete the t_bme_task table first, and then delete the TASKRUNSULT table record.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.