How many null values in unique key in oracle




















No Account? Sign up. By signing in, you agree to our Terms of Use and Privacy Policy. Already have an account? Sign in. By signing up, you agree to our Terms of Use and Privacy Policy.

Enter the email address associated with your account. We'll send a magic link to your inbox. Email Address. All Sign in options. Enter a Email Address. Add a comment. Active Oldest Votes. This does not work for a unique index over two or more columns though. I was just answering the OP's question as asked , where he mentioned "unique constraint column" notice the singular, and no mention of a composite unique constraint.

However, the correct concept of "null values" in the unique key is that ALL columns are null, not some null and the other s non-null. Sorry, I didn't know your situation was different from what you had in the question or I would have put that in my answer. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. And of course, keep up to date with AskTOM via the official twitter account.

Questions Purpose of Unique constraint. Question and Answer. You Asked Hi Tom, I am totally confused about unique constraint. It's been a number of years since I've worked with SQL Server so there may be a switch to change this.

But they way they handle unique constraints and NULLs is different. When using a meaningless primary key value instead of a primary key with a semantic meaning, there is no business need for changing it. For example a bulk tables like a logging-table. For data warehouse dimension tables, star schema, it is necessary to define a natural key when the primary key is a surrogate key.



0コメント

  • 1000 / 1000