adspace


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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

what are the advantages of sql ? : Sql dba

1142


Hi am new to PLSQL & facing problems in writing code like in SP, Functions, so any one having some SP coding with in depth explanation please share with me my Email ID suvarnaatsuvarna@rediffmail.com Or taking tanning on this please do contact me

2091


What is the current version of postgresql?

1178


what is bcp? When does it used? : Sql dba

1056


Can delete statement be rollbacked?

1054


Can we rollback truncate?

1074


Does group by remove duplicates?

1112


how to escape special characters in sql statements? : Sql dba

1114


Can we use distinct and group by together?

1133


what is sql server agent? : Sql dba

1182


What is the current version of sql?

1094


what are all the common sql function? : Sql dba

1131


Is inner join faster than left join?

1277


what is schema? : Sql dba

1147


what is dbms? : Sql dba

1061