MySQL Forums
Forum List  »  Oracle

Re: Equivalent for all_catalog
Posted by: Vani Chiganmy
Date: June 14, 2006 09:25AM

Thank you very much. Now Iam facing one more issue while trying to alter table.


I have a table A and B and trying alter table B to add constriant, but getting exception, sql is correct. Can you please help me to resolve this issue


Table 1:

mysql> desc A;
+----------------------+-----------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------------------+-----------------------+------+-----+---------+----------------+
| CreationOrder | mediumint(8) unsigned | NO | PRI | | auto_increment |
| Name | varchar(25) | NO | PRI | | |
| IsEditable | smallint(6) | NO | | | |



mysql> desc B
-> ;
+-----------------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------------------+--------------+------+-----+---------+-------+
| AssociatedEntityName$ | varchar(25) | NO | PRI | | |
| Name | varchar(100) | NO | PRI | | |
| Occurs | varchar(10) | NO | | | |




Executing this SQL fails with error:

alter table B
add constraint SDO$FAssociated$Association$ foreign key (AssociatedEntityName$)
references A(Name)

mysql> alter table B add constraint SDO$FAssociated$Association$ foreign key (AssociatedEntityName$) references A(Name);
ERROR 1005 (HY000): Can't create table '.\realm1\#sql-177c_32.frm' (errno: 150)


Thanks.

Options: ReplyQuote


Subject
Views
Written By
Posted
5531
June 14, 2006 08:54AM
2445
June 14, 2006 09:04AM
Re: Equivalent for all_catalog
2957
June 14, 2006 09:25AM
2342
June 14, 2006 11:13AM
2702
June 14, 2006 11:22AM
2431
June 14, 2006 11:31AM
2834
June 14, 2006 11:39AM
2628
June 14, 2006 11:52AM
2538
June 14, 2006 02:04PM
2537
June 14, 2006 06:12PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.