[go: up one dir, main page]

0% found this document useful (0 votes)
22 views1 page

Assignment 1

The document creates a Worker table with a FIRST_NAME column, inserts names into it, selects names from it, alters the table to add a unique DEPARMENT column, inserts more names specifying the FIRST_NAME column, and selects names not equal to 'Vipul' or 'Satish'.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views1 page

Assignment 1

The document creates a Worker table with a FIRST_NAME column, inserts names into it, selects names from it, alters the table to add a unique DEPARMENT column, inserts more names specifying the FIRST_NAME column, and selects names not equal to 'Vipul' or 'Satish'.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

create Table Worker(FIRST_NAME varchar(30));

INSERT INTO Worker values('Anirban');

insert into Worker values('Shubham');

insert into Worker values('Supriyo');

select FIRST_NAME as "WORKER_NAME"

from Worker;

ALTER TABLE Worker

ADD DEPARMENT varchar(30) unique key;

INSERT INTO Worker (FIRST_NAME) values ('Rakesh');

INSERT INTO Worker (FIRST_NAME) values ('vipul');

INSERT INTO Worker (FIRST_NAME) values ('Satish');

SELECT * FROM Worker WHERE FIRST_NAME != 'Vipul' AND FIRST_NAME != 'Satish';

You might also like