Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


In my table i have 4 columns with 100 records
but in that 4 columns one column contains all NULL values
so can i add NOT NULL CONSTRAINT on that column......... ok
if it is not possible, can i add NOT NULL CONSTRAINT from
101 Record Onwards?

Answers were Sorted based on User's Feedback



In my table i have 4 columns with 100 records but in that 4 columns one column contains all NULL v..

Answer / manish kumar

this is not possible we can't create Not Null Constraint in
this column. b'case existing record in column is already
null so oracle through
error: null record found.

Is This Answer Correct ?    15 Yes 2 No

In my table i have 4 columns with 100 records but in that 4 columns one column contains all NULL v..

Answer / sudipta santra

Yes, Krupananda, U r very right..I am explainning the trigger:

Create or replace trigger bri_tab_101_rec
before insert on table1
for each row

declare
usr_ins_excep exception;
begin
if :new.column4 is null then
raise usr_ins_exception;
end if;
exception
when usr_ins_excep
<< do exception code>>
rollback;
end;

Is This Answer Correct ?    4 Yes 0 No

In my table i have 4 columns with 100 records but in that 4 columns one column contains all NULL v..

Answer / krupananda

It is not possible to add not null constraint on existing
column which contains null values.
but we can add not null constraint from 101 record onwards
using triggers.

using triggers it is possible to restrict not null values

Is This Answer Correct ?    4 Yes 1 No

In my table i have 4 columns with 100 records but in that 4 columns one column contains all NULL v..

Answer / preethi raju

Yes it is possible by using novalidate with alter table command:

alter table table_name modify(column_with_null constraint constraint_name not null novalidate);

So the novalidate does not check the existing columns which contains the null values.

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More Oracle General Interview Questions

a query to select maxmun 3 salaries of employee table

12 Answers   IBM, Polaris,


How to create a new table in oracle?

0 Answers  


Who i will insert 1 lacks record in a Database table

4 Answers   TCS,


How to drop an index?

0 Answers  


What is the scope of a local variable?

0 Answers  


How to convert csv to table in oracle?

0 Answers  


How to connect the oracle server as sysdba?

0 Answers  


How to use "startup" command to start default instance?

0 Answers  


what are the things that you consider while creating indexes on partitioning tables?

1 Answers  


What is tablespace in oracle? how can we create? how is it manage? . . . Thnx 2 All in Advnc....:)

3 Answers  


How many different types of indexes we have in oracle?

24 Answers   IBM, TCS,


What is null value in oracle?

0 Answers  


Categories
  • Oracle General Interview Questions Oracle General (1809)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)