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

How to prepare for oracle pl sql certification?

1010


Is postgresql a nosql database?

1074


what are integrity rules?

964


What are the types of subqueries?

1014


what is uncommittable transactions? : Transact sql

953


What are pl/sql cursor exceptions?

1036


What are functions in sql?

899


What is join view in sql?

897


What are different functions in sql?

897


Define implicit and explicit cursors.

1074


How to write a single statement that concatenates the words ?hello? And ?world? And assign it in a variable named greeting?

1034


What is the difference between execution of triggers and stored procedures?

1050


What schema means?

845


how is myisam table stored? : Sql dba

996


Explain exception handling in pl/sql?

988