Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 211535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T18:06:15+00:00 2026-05-11T18:06:15+00:00

In the Derby server, how can you use the information in the system tables

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T18:06:15+00:00Added an answer on May 11, 2026 at 6:06 pm

    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

    SELECT c.constraintname, t.tablename
        FROM sysconstraints c, systables t
        WHERE c.tableid = t.tableid;
    

    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:

    SELECT c.constraintname, t.tablename
      FROM sys.sysconstraints c
      JOIN sys.systables t
        ON c.tableid = t.tableid;
    

    You can add extra columns — for example, c.type to get the constraint type.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two tables in a derby database that I want to query together.
I am using timestampdiff in derby db to retrieve the time difference between 2
Attempting to use JRuby 1.2.0 and Rails 2.3.2 with an embedded Derby database. I've
I'm using Eclipse and wish to also use the Derby database and am having
I'm running Apache Derby server on Eclipse EE. My issue is that whenever I
I need do start the derby server from my java application using org.apache.derby.drda.NetworkServerControl class.
I am using Hibernate (JPA) with Derby database - my app server is Jboss
I am using the GlassFish 3 server adapter with Eclipse Helios 3.6. I can
I'm trying to start Derby in Network server mode from my Java application with
I am new to apache derby and I cant seem to make work CREATE

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.