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 6154165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:13:02+00:00 2026-05-23T20:13:02+00:00

given the following sample table structure is there a way to add to a

  • 0

given the following sample table structure is there a way to add to a unique constraint to insure uniqueness for (GUID, ‘Y’) combination?

Application logic – update by guid generates a new version with same guid but new luid; and previous goes inactive(‘Y’->’N’)

GUID – external id
LUID – internal id

 create table id_active(
    "GUID" RAW(16) NOT NULL,
    "LUID" RAW(16) NOT NULL,
    "IS_ACTIVE" char(1) NOT NULL CHECK ( "IS_ACTIVE" IN ('Y', 'N')),
 PRIMARY KEY ("GUID", "LUID"),
 --unique constraint goes here
  • 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-23T20:13:03+00:00Added an answer on May 23, 2026 at 8:13 pm

    You can create a unique function-based index and leverage the fact that Oracle does not index NULL values in b-tree indexes.

    CREATE UNIQUE INDEX one_active_guid
        ON table_name( (CASE WHEN is_active = 'Y'
                             THEN guid
                             ELSE null
                          END) );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Given the following simple table structure (SQL Server 2008), I want to be able
Given the following sample table schema Customer Table CustID 1 2 3 Invoice Table
Given the following code sample: uint8_t i, in, ni; i = in = 2;
Given the following: List<List<Option>> optionLists; what would be a quick way to determine the
I have data in a table that looks like the following sample data: varchar(20)
Given the following table (how to format those correctly here?) primary secondary A a
Give the following simple table structure: Departments PK - DeptID DeptName -------------------------- 1 Department
I have a simple lookup table, which consists of the following structure: int |
Consider the following table with a constraint that's a bit daft but simple enough
Given the following simple example: List<string> list = new List<string>() { One, Two, Three,

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.