Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

I am trying to find out all the foreign keys declared in my database along with the attributes of each key, for example is there a delete or update action defined for that key, etc. if I can some how get the script that defines these keys that would be even better. Is there a way to do that?

asked 23 Jan '13, 10:04

javedrehman's gravatar image

javedrehman
256141421
accept rate: 0%


If you can unload the full schema for the database, that will provide the statements used to create tables, foreign keys, etc. This can be done with dbunload -n.

Otherwise, you may be able to piece the information together from certain systems views:

Integrity rules in the system tables

permanent link

answered 23 Jan '13, 13:58

Tyson%20Lewis's gravatar image

Tyson Lewis
2.2k1641
accept rate: 22%

edited 24 Jan '13, 12:18

@Tyson: that link didn't work for me, I had to change it to this one:
http://dcx.sybase.com/index.html#1201/en/dbusage/intrevw.html

(24 Jan '13, 03:28) Reimer Pods
Replies hidden
1

Tyson lives inside the Golden Palace where all things are possible :)

(24 Jan '13, 11:04) Breck Carter

Ah, yes, that would be an oversight on my part. I have a DNS suffix for .sybase.com configured on my machine, and occasionally forget that when I link to a page.

I've edited my answer to include the full domain name.

(24 Jan '13, 12:21) Tyson Lewis
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×31

question asked: 23 Jan '13, 10:04

question was seen: 1,685 times

last updated: 24 Jan '13, 12:21