|
Help with SQL statement
|
|
05-07-2009, 06:52 PM
Post: #1
|
|||
|
|||
|
Help with SQL statement
Hi,
Sorry for my english. Im a new in sybase. Im using sybase 10.0.1. I need to write such SQL statement which returns the name of foreignkey COLUMN name. I know only primary and foreign table names. Example: i have two tables Reiksmes and Temp. Where reiksmes.id =temp.fk_reiksmes. So i need that SQL return me foreign table, foreignkey, column name - fk_reiksmes. I tried such a thing: select columns from sysforeignkeys where foreign_tname = 'temp' and primary_tname = 'reiksmes' but it returned such thing: 'fk_reiksmes IS id' this is not good, becouse after i need to split this string by space etc... Who can help me? Thank you. |
|||
|
01-07-2010, 01:10 PM
Post: #2
|
|||
|
|||
|
RE: Help with SQL statement
sp_helpconstrain tablename will show all forgin key constrains on the specific table
(05-07-2009 06:52 PM)Vaxlt Wrote: Hi, |
|||
|
« Next Oldest | Next Newest »
|
| Possibly Related Threads... | |||||
| Thread: | Author | Replies: | Views: | Last Post | |
| can any body provide solution what needs to be done when alter statement giveing erro | mnpreddy | 1 | 140 |
09-17-2009 10:42 PM Last Post: john |
|


Chat Support
Search
Disclaimer & Rules
Help


