In the Derby server, how can you use the information in the system tables of the schema to create a select statement in order to retrieve the constraint names for each table?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The relevant manual is the Derby Reference Manual. There are many versions available: 10.13 was current in April 2017, but it was 10.3 in May 2009.
Original answer
Since sufficiently recent versions of Derby require that the system catalogue tables are prefixed by
sys.(10.13 is quoted by kiwicomb123 in a comment), you can revise the query to use the explicit JOIN notation too, and use:You can add extra columns — for example,
c.typeto get the constraint type.