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

  • SEARCH
  • Home
  • 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 8315571
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:09:43+00:00 2026-06-08T21:09:43+00:00

In one of my Java EE applications, I used a registration page to register

  • 0

In one of my Java EE applications, I used a registration page to register new user and as soon as one registers, his/her registered values will be inserted into Oracle database. But there is no way of detecting duplicate values. So I thought about adding unique constraint to some column values. But later I learned, I can’t declare more than one column as unique( In my case I already declared userid as primary key). But I need to make more than one column values unique (like emialid field). Again only adding unique can’t help as if a user submits a form with duplicate value an exception will be caught and user won’t be able to understand as he will be redirected to a blank page. So I have 2 questions.

1) How can I inform the user about inserting duplicate values?

and

2) How can I make more than one column unique in Oracle?

N.B. I don’t know javascript!!

  • 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-06-08T21:09:45+00:00Added an answer on June 8, 2026 at 9:09 pm

    First, you certainly can declare multiple unique constraints on a table. You can declare that userid is a primary key and then declare emailid as unique. You can declare as many unique constraints as you’d like.

    Second, your application would need to catch the duplicate key constraint and do something useful with it. Redirecting the user to a blank page would not be useful– your application ought to catch the constraint exception and present a useful message to the user. For example, if you get an exception stating that the constraint UK_EMAILID was violated, you’d probably want to present an error message to the user saying something along the lines of “This email address already exists.”

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

Sidebar

Related Questions

I have two separated applications, one written in Java and other in Erlang. Both
I noticed in two applications to generate hashes of files, one written in Java
I am used to develop web applications in Java (Struts, Spring, JSP...). But now
I'm using Eclipse to learn to develop Android applications in Java. I haven't used
I am using Socket communication in one of my Java applications.As I know if
I want to run several REST web applications inside one Java process to save
We have a couple of Java Web applications that serve different purposes (one for
In one of our components ported from Java to C#, we used FileInfo as
I am fairly new to web programming, I have mainly used java to create
We have recently upgraded one of our applications from Java 1.4 to Java 6.

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.