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?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a crud api?

954


Is primary key an index?

991


Give the order of sql select?

1135


what is the difference difference between procedure and packages

10405


How to run sql*plus commands in sql developer?

1156


List the ways to get the count of records in a table?

900


Why select is used in sql?

1017


Can you rollback after commit?

982


What are pl sql procedures?

1024


What is nested table in pl sql?

1070


What is the maximum rows in csv?

920


Is pl sql different from sql?

996


What is a rank in sql?

963


What is sap sql?

980


how to calculate the difference between two dates? : Sql dba

1062