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

Can we use ddl statements in stored procedure?

0 Answers  


What is difference between joins and union?

0 Answers  


Which is the correct statement about truncate and delete?

0 Answers  


how to get @@error and @@rowcount at the same time? : Sql dba

0 Answers  


Is primary key clustered or nonclustered?

0 Answers  


What is break?

0 Answers  


What is the maximum number of triggers, you can apply on a single table?

0 Answers  


Which one is better sql or oracle?

0 Answers  


what is the difference between cluster and non cluster index? : Sql dba

0 Answers  


How many levels can subqueries be nested in a FROM clause?

7 Answers  


What is bitemporal narrowing?

0 Answers  


how u can find the n row from a table?

19 Answers   Tech Mahindra,


Categories