Home » SQL & PL/SQL » SQL & PL/SQL » Numbers beginning with 0
Numbers beginning with 0 [message #4008] Fri, 01 November 2002 11:56 Go to next message
Michael Wilusz
Messages: 4
Registered: November 2002
Junior Member
I'm attempting to make a table in SQL*PLUS and one of the columns has social security numbers. If a SSN starts with 0, it takes off the 0. So the number 057770686 shows as 57770686. How can I fix this.

The column is set as: SSN number(9)
Re: Numbers beginning with 0 [message #4009 is a reply to message #4008] Fri, 01 November 2002 12:01 Go to previous messageGo to next message
Michael Wilusz
Messages: 4
Registered: November 2002
Junior Member
Also, how would I query the database for all students with GPA less than 2.0 and find the average of all the GPA's in my table.

I'm also using UNIX-based SQL*PLUS... if that helps.

Thanks again all! :)
Re: Numbers beginning with 0 [message #4011 is a reply to message #4008] Fri, 01 November 2002 14:37 Go to previous message
Michael Wilusz
Messages: 4
Registered: November 2002
Junior Member
Thanks for the reply! A few more questions though...

How can I just print the full table to the screen?
Let's say I have SSN as a number, how do I change it to charvar2 without doing the table over?
How do I change a column title from SSN to Social Security for example. Thanks again!

-Mike
Previous Topic: Hands On
Next Topic: More newbie questions...
Goto Forum:
  


Current Time: Sun Apr 28 19:26:49 CDT 2024