PL/SQL (MOSC)

MOSC Banner

How to insert numbers only?

edited Jun 7, 2018 7:44AM in PL/SQL (MOSC) 6 commentsAnswered ✓

Hello there,

We like to insert numbers only into a column.  So we set the column datatype as number.  However, leading zero is treated as a space, which is not right in our case.  One example is social security number and there are many of them starting with zero.  Please advise if there is a way to keep the leading zero in our insert.

Some people recommend use char datatype.  The problem with that is we don't like to have any char in that column, such as -_'=+<!/\ etc.  Is there a way to insert numbers only into a column with char datatype?

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center