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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T10:29:07+00:00 2026-05-11T10:29:07+00:00

How do you guys treat empty strings with Oracle? Statement #1 : Oracle treats

  • 0

How do you guys treat empty strings with Oracle?

Statement #1: Oracle treats empty string (e.g. ”) as NULL in ‘varchar2’ fields.
Statement #2: We have a model that defines abstract ‘table structure’, where for we have fields, that can’t be NULL, but can be ’empty’. This model works with various DBMS; almost everywhere, all is just fine, but not with Oracle. You just can’t insert empty string into a ‘not null’ field.
Statement #3: non-empty default value is not allowed in our case.

So, would someone be so kind to tell me – how can we resolve it?

  • 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. 2026-05-11T10:29:08+00:00Added an answer on May 11, 2026 at 10:29 am

    This is why I’ve never understood why Oracle is so popular. They don’t actually follow the SQL standard, based on a silly decision they made many years ago.

    The Oracle 9i SQL Reference states (this has been there for at least three major versions):

    Oracle currently treats a character value with a length of zero as null. However, this may not continue to be true in future releases, and Oracle recommends that you do not treat empty strings the same as nulls.

    But they don’t say what you should do. The only ways I’ve ever found to get around this problem are either:

    • have a sentinel value that cannot occur in your real data to represent NULL (e.g, ‘deoxyribonucleic’ for a surname field and hope that the movie stars don’t start giving their kids weird surnames as well as weird first names :-).
    • have a separate field to indicate whether the first field is valid or not, basically what a real database does with NULLs.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 150k
  • Answers 150k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Your $digit is scoped within the while loop and then… May 12, 2026 at 9:45 am
  • Editorial Team
    Editorial Team added an answer Static members will never be allocated on the stack. When… May 12, 2026 at 9:45 am
  • Editorial Team
    Editorial Team added an answer This is how the grammar is defined. Look at: System.String… May 12, 2026 at 9:45 am

Related Questions

We have bunch of autogenerated classes which are mostly Axis2 stubs, skeletons etc. For
How do you guys manage the information overflow? What are the tools that you
How do you guys organise your asp.net web applications? Do you have you classes
How do you guys typically delete files on Linux OS? I am thinking of

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.