Hi Thusitha, I tried the subquery approach before but it does not get the identifier properly from the sub query. When I run the subquery only, it shows me the constraint name. But when it comes to the main query, it does not get the identifier.
Hi Madhuranga, Thanks for the reply, but the approach has a few problems. When the table contains large number of record sets, this operation will take time and if one query fails I may lose all my data. Regards, Madusanka On Mon, May 18, 2015 at 6:18 PM, Madhuranga Bandara <[email protected]> wrote: > Hi Madushanka, > > This article [1] provides the step by step explanation on how to solve > this kind of issue. > Hope this is helpful. > > [1] http://www.briskbee.com/posts/changing_unnamed_constraints_in_play_ > > > *Madhuranga Sampath Bandara* > Software Engineer > > WSO2, Inc.;http://wso2.com/ > <http://www.google.com/url?q=http%3A%2F%2Fwso2.com%2F&sa=D&sntz=1&usg=AFQjCNGJuLRux6KkJwXKVUCYOtEsNCmIAQ> > lean.enterprise.middleware > Mobile: +94722241065 > > On Mon, May 18, 2015 at 5:52 PM, Madusanka Premaratne <[email protected] > > wrote: > >> Hi Devs, >> I need to perform a SQL table alteration to remove a foreign key which is >> unnamed. As per my findings it is possible to find the automatically >> assigned constraint name in mysql by using *information_schema* table [1] >> >> Also it is possible in mssql[2] and oracle[3] >> >> [1] - >> http://stackoverflow.com/questions/13856946/drop-unnamed-foreign-key-in-mysql >> [2] - http://www.intergr8it.net/?p=19 >> [3] - >> http://stackoverflow.com/questions/9008445/drop-index-or-constraint-without-knowing-its-name-for-oracle >> >> I tried to add a name to the existing constraint by altering the table, >> but it adds a new constraint with the given name. >> >> Is there a way to do the same in H2/ any other way to delete >> the constraint? >> >> Can someone advice me to do this.? >> >> Thanks in advance. >> Madusanka >> >> >> >> -- >> *Madusanka Premaratne* | Associate Software Engineer >> WSO2, Inc | lean. enterprise. middleware. >> #20, Palm Grove, Colombo 03, Sri Lanka >> Mobile: +94 71 835 70 73| Work: +94 112 145 345 >> Email: [email protected] | Web: www.wso2.com >> >> [image: Facebook] <https://www.facebook.com/maduzanka> [image: Twitter] >> <https://twitter.com/rmmpremaratne> [image: Google Plus] >> <https://plus.google.com/u/0/+MadusankaPremaratnemaduz/about/p/pub> [image: >> Linkedin] <http://lk.linkedin.com/in/madusanka/> [image: Instagram] >> <http://instagram.com/madusankapremaratne> [image: Skype] >> <http://@rmmpremaratne> >> >> >> _______________________________________________ >> Dev mailing list >> [email protected] >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > -- *Madusanka Premaratne* | Associate Software Engineer WSO2, Inc | lean. enterprise. middleware. #20, Palm Grove, Colombo 03, Sri Lanka Mobile: +94 71 835 70 73| Work: +94 112 145 345 Email: [email protected] | Web: www.wso2.com [image: Facebook] <https://www.facebook.com/maduzanka> [image: Twitter] <https://twitter.com/rmmpremaratne> [image: Google Plus] <https://plus.google.com/u/0/+MadusankaPremaratnemaduz/about/p/pub> [image: Linkedin] <http://lk.linkedin.com/in/madusanka/> [image: Instagram] <http://instagram.com/madusankapremaratne> [image: Skype] <http://@rmmpremaratne>
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
