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...


If we have n no of columns in a table, can we add new
column in that table with not null constraint?

Answers were Sorted based on User's Feedback



If we have n no of columns in a table, can we add new column in that table with not null constrain..

Answer / srinu

U r correct Chandan.But one thing,what is that is if the
table contains some data at that time syntax for adding new
column to that table with notnull constraint is....

alter table table_name add column_name datatype default
value constraint constraint_name not null;

if we want 2 know which columns have which constraints then
the syntax is

select column_name,constraint_type
from user_cons_columns
where table_name='EMP';

Is This Answer Correct ?    7 Yes 1 No

If we have n no of columns in a table, can we add new column in that table with not null constrain..

Answer / chandan kumar

If table is empty (means no records are there) then we can
add the constraint.

alter table tablename add (col_name datatype not null)

Is This Answer Correct ?    6 Yes 2 No

Post New Answer

More SQL PLSQL Interview Questions

What are different types of sql?

0 Answers  


How do you optimize SQL queries ?

6 Answers   CarrizalSoft Technologies, Infosys, Oracle,


how to enter characters as hex numbers? : Sql dba

0 Answers  


What is faster join or subquery?

0 Answers  


What are views in sql?

0 Answers  


is it necessary to write group by and order by clause together

3 Answers   HCL, Wipro,


What does select * from mean in sql?

0 Answers  


How do you get all records from 2 tables. Which join do you use?

8 Answers   Microsoft,


Is it possible to create startup or shutdown trigger for on-schema?

0 Answers  


i have doubt that any one tell ref cursor comes in sql pl/sql? pls clarify?

4 Answers   Tech Mahindra,


what are the advantages of sql ? : Sql dba

0 Answers  


What is an implicit commit?

0 Answers  


Categories