Monday 11 April 2011

DDL : Altering a table

alter table employee add cell_no numeric(10) null
go
alter table employee drop constraint 'emp_dept_constr'
go

/* add default */
alter table charge_item replace price_overridable_ind default 0
go

/* change column name -- quotes are required */
sp_rename 'employee.dept',dept_name
go

No comments:

Post a Comment