PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, August 11, 2022

[FIXED] How to insert null or empty value to decimal column in oracle?

 August 11, 2022     decimal, oracle, sql     No comments   

Issue

If it is a string column, I can insert null or empty value with '', but what about the decimal column, Null or -99999? Thanks so much for any advice.


Solution

You can insert null values into the table with a column type integer. Empty_string and null is the same in oracle.

Eg:

create table t(x int)

insert into t values('')
insert into t values(null)

select count(*),count(x)
  from t

https://dbfiddle.uk/?rdbms=oracle_11.2&fiddle=e7653cf554a9e19a8ae47f1c101218ff



Answered By - George Joseph
Answer Checked By - Dawn Plyler (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing