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
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 |
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 |
Delete the emps whose salaries are lowest sals of their own dept.
Is oracel sql developer written in java?
What is the difference between alter trigger and drop trigger statements?
What are tables and fields?
How do I count duplicates in sql?
Can a composite key be null?
i have a customer table. trans_id trans_date trans_amt debit_credit_indicator 001 01-JAN-13 1099 cr 001 12-JAN-13 500 db 002 24-FEB-13 400 db 002 23-MAR-13 345 cr 001 18-APR-13 800 cr 002 15-MAR-13 600 db 001 12-FEB-13 200 cr i want like this output. trans_id trans_amt debit_credit_indicator i want get highest credit amount and lowest credit amount and highest debit amount and lowest debit amount for each trans_id.
Mention what plvcmt and plvrb does in pl/sql?
Is delete faster than truncate?
What is the need of a partition key?
What do you understand by pl/sql packages?
What is AUTH_ID and AUTH_USER in pl/sql ?