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
What is percent sign in sql?
what is 'mysqlshow'? : Sql dba
How do you copy a table in sql?
Why is pl sql needed?
What are pl/sql cursor exceptions?
What action do you have to perform before retrieving data from the next result set of a stored procedure ?
how to create a new table in mysql? : Sql dba
Which join is like an inner join?
What happens when a trigger is associated to a view?
Explain cursor types?
Where not exists in sql?
Explain what is a view?
What is difference between primary and secondary key?
What is database migration?
why does the selected column have to be in the group by clause or part of an aggregate function? : Sql dba