Monday, 25 April 2011

Add primary key with existing table

create database bossuse bosscreate table emp(emp_name varchar(30) not null,emp_id int ,emp_sal int)insert
into emp (emp_name,emp_id,emp_sal)values('titu',140,9000)ALTER TABLE emp ADD CONSTRAINT pk_emp_ID PRIMARY KEY(emp_name)

No comments:

Post a Comment