Job Seekers   Employers
dbapool: Authors | Submissions | Contact Us
   Forgot password? | Sign up
  Home   Discussion Forum   Articles   Interview Questions   FAQs   Scripts   Rewards   Analyzer   White Papers   Blog   Certification   Downloads   Tools
 

Topic: SQL*Plus and PL/SQL >> change a column with existing data to NULL

Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property. You may review the entire Oracle Certification Program Candidate Agreement online Here.



  


 Title: change a column with existing data to NULL
 Burton  Posted: Mar 23, 2007 08:36:00 AM

 Total Post: 53
 Joined: Dec, 2006






 Amigos:
When we change a column that already has data in it, and change it to NULL, what happens to the data that already exists in the column? is it set to NULL also, or is only the data that is inserted *after* we change the column set to NULL?

B

 Burton
Posted: Mar 23, 2007 10:00:02 AM  

 Total Post: 53
 Joined: Dec, 2006






 
OK - I answered this one myself by making a test table:
Using
update t set c = null;
will change the existing rows to null. This is an example of using the = operator with the NULL.

Cheers.
B

 Rush
Posted: Mar 25, 2007 03:49:13 AM  

 Total Post: 127
 Joined: Jan, 2007






 
hi Butron
you can set NULL OR NOT NULL but the property of null and not null will be applyed when the columns satisfy the rul

1) NOT NULL column set to null->alltheexisting data should be removed first.
2)NULL column set to not null->every rowof that column should haveany value.

thanks and regard

RUPESH

 Burton
Posted: Mar 25, 2007 08:17:37 AM  

 Total Post: 53
 Joined: Dec, 2006






 
Yes, I think the point here is that this is an example of using "=" NULL instead of IS NULL.

 Time Zone: EDT

  




Forum Rules & Description


Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user




 








Get FREE Magazines

Top 10 Forum User

  Murtuja Khokhar857
  Mohammed Taj746
  positive fanatic483
  Jayanta Sur479
  Vigyan Kaushik386
  Vinoth Kumar357
  Gopu Gopi340
  Gitesh Trivedi322
  neeraj sharma258
  Ramesh Jois246






oracle Mag



  About Us Advertise Terms of Use Privacy Newsletters Contact Us    

Home   Discussion Forum   FAQs  Articles  Jobs   Newsletters  Directory  Downloads 

Our Premium Sponsor
Confio Software