0% found this document useful (0 votes)
18 views16 pages

Set Ans

Uploaded by

atharv sooraj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views16 pages

Set Ans

Uploaded by

atharv sooraj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

SET – 1

1. Creating a python program to implement stack operations (list).


ANS) def PUSH(stk):
a=input('Enter a city:')
stk.append(a)

def POP(stk):
if len(stk)==0:
print('STACK UNDERFLOW')
else:
c=stk.pop()
print('The popped city is:',c)

def DISPLAY(stk):
if len(stk)==0:
print('STACK EMPTY')
else:
print("The stack elements are:")
print(stk[-1],'<--TOP')
for i in reversed(stk[:-1]):
print(i)

print('STACK IMPLEMENTATION PROGRAM')


stk=[]
ans='y'
while ans.lower()=='y':
print('1-PUSH\n2-POP\n3-DISPLAY\n4-EXIT')
ch=int(input('Enter your choice:'))
if ch==1:
PUSH(stk)
elif ch==2:
POP(stk)
elif ch==3:
DISPLAY(stk)
elif ch==4:
break
ans=input('Do you want to do any operation(y/n):')
2. TABLE - STU
Rollno Name Gender Age Dept DOA Fees
1 Arun M 24 COMPUTER 1997-01-10 120
2 Ankit M 21 HISTORY 1998-03-24 200
3 Anu F 20 HINDI 1996-12-12 300
4 Bala M 19 NULL 1999-07-01 400
5 Charan M 18 HINDI 1997-09-05 250
6 Deepa F 19 HISTORY 1997-06-27 300
7 Dinesh M 22 COMPUTER 1997-02-25 210
8 Usha F 23 NULL 1997-07-31 200
(CREATE DATABASE, USE, CREATE TABLE, INSERT COMMANDS ARE MANDATORY)

- CREATE DATABASE DATABASE_NAME;


- USE DATABASE_NAME;
- CREATE TABLE STU(ROLLNO INT PRIMARY KEY,NAME VARCHAR(10), GENDER VARCHAR(3),
AGE INT,DEPT VARCHAR(15),DOA DATE,FEES INT);
- INSERT INTO STU VALUES (1,'Arun','M', 24,'COMPUTER','1997-01-10', 120);
- INSERT INTO STU VALUES (2,'Ankit','M', 21,'HISTORY','1998-03-24', 200);
- INSERT INTO STU VALUES (3,'Anu','F', 20,'HINDI','1996-12-12', 300);
- INSERT INTO STU VALUES (4,'Bala','M', 19, NULL,'1999-07-01', 400);
- INSERT INTO STU VALUES (5,'Charan','M', 18,'HINDI','1997-06-27', 250);
- INSERT INTO STU VALUES (6,'Deepa','F', 19,'HISTORY','1997-06-27', 300);
- INSERT INTO STU VALUES (7,'Dinesh','M', 22,'COMPUTER','1997-02-25', 210);
- INSERT INTO STU VALUES (8,'Usha','F', 23, NULL,'1997-07-31', 200);

(a) Write a Query to Create a new database in the name of "STUDENTS".


ANS) CREATE DATABASE STUDENTS;

(b) Write a Query to Open the database "STUDENTS".


ANS) USE STUDENTS;

(c) Write a Query to create the above table called: "STU"


ANS) CREATE TABLE STU(ROLLNO INT PRIMARY KEY,NAME VARCHAR(10), GENDER VARCHAR(3),
AGE INT,DEPT VARCHAR(15),DOA DATE,FEES INT);

(d) Write a Query to list all the existing database names


ANS) SHOW DATABASES;

(e) Write a Query to List all the tables that exists in the current database.
ANS) SHOW TABLES;
SET – 2
1. Creating a python program to create and search employee’s record in
csv file.
ANS)
import csv
def addrec():
a = open('emp.csv','w',newline='')
b=csv.writer(a)
l=[]
ans='y'
while ans=='y':
eno=int(input("Enter the emp no:"))
ename=input("Enter emp name :")
s=int(input("Enter emp salary:"))
l.append([eno,ename,s])
ans=input("Do you want to add another record(y/n):")
b.writerows(l)
print("record stored")
a.close()

def searchrec():
a = open('emp.csv','r',newline='')
b = csv.reader(a)
s=int(input('Enter the emp no which you want to search:'))
for i in b:
if i[0]==str(s):
print("The details found are:",i)
break
else:
print('no record found')
a.close()
print("Employee details - search record program")
addrec()
searchrec()
2. TABLE - STU
Rollno Name Gender Age Dept DOA Fees
1 Arun M 24 COMPUTER 1997-01-10 120
2 Ankit M 21 HISTORY 1998-03-24 200
3 Anu F 20 HINDI 1996-12-12 300
4 Bala M 19 NULL 1999-07-01 400
5 Charan M 18 HINDI 1997-09-05 250
6 Deepa F 19 HISTORY 1997-06-27 300
7 Dinesh M 22 COMPUTER 1997-02-25 210
8 Usha F 23 NULL 1997-07-31 200
(CREATE DATABASE, USE, CREATE TABLE, INSERT COMMANDS ARE MANDATORY)

- CREATE DATABASE DATABASE_NAME;


- USE DATABASE_NAME;
- CREATE TABLE STU(ROLLNO INT PRIMARY KEY,NAME VARCHAR(10), GENDER VARCHAR(3),
AGE INT,DEPT VARCHAR(15),DOA DATE,FEES INT);
- INSERT INTO STU VALUES (1,'Arun','M', 24,'COMPUTER','1997-01-10', 120);
- INSERT INTO STU VALUES (2,'Ankit','M', 21,'HISTORY','1998-03-24', 200);
- INSERT INTO STU VALUES (3,'Anu','F', 20,'HINDI','1996-12-12', 300);
- INSERT INTO STU VALUES (4,'Bala','M', 19, NULL,'1999-07-01', 400);
- INSERT INTO STU VALUES (5,'Charan','M', 18,'HINDI','1997-06-27', 250);
- INSERT INTO STU VALUES (6,'Deepa','F', 19,'HISTORY','1997-06-27', 300);
- INSERT INTO STU VALUES (7,'Dinesh','M', 22,'COMPUTER','1997-02-25', 210);
- INSERT INTO STU VALUES (8,'Usha','F', 23, NULL,'1997-07-31', 200);

(a) Write a Query to insert all the rows above.


ANS) ALL THE ABOVE INSERT COMMANDS

(b) Write a Query to display all the details of the Employees from the above table 'STU'.
ANS) SELECT * FROM STU;

(c) Write a query to display Rollno, Name and Department from STU table.
ANS) SELECT ROLLNO,NAME,DEPT FROM STU;

(d) Write a Query to display distinct Department from STU table.


ANS) SELECT DISTICT(DEPT) FROM STU;

(e) To show all information about students of History department.


ANS) SELECT * FROM STU WHERE DEPT='HISTORY';
SET – 3
1. Creating a python program to create and search records in binary file.
ANS)
import pickle
def addrec():
a=open('student.bin','wb')
print('Add student details')
l=[]
ans='y'
while ans=='y':
r=int(input("Enter the roll no:"))
n=input("Enter name :")
m=float(input("Enter mark:"))
l.append([r,n,m])
print(l)
ans=input("Do you want to add another record(y/n):")
pickle.dump(l,a)
print("Records stored successfully!.")
a.close()
def searchrec():
a=open("student.bin",'rb')
r=int(input("Enter the roll no which you want to search:"))
b=pickle.load(a)
for i in b:
if r==i[0]:
print("The searched roll number details are:",i)
break
else:
print("Entered Roll no not found in the file")

print("Student record search program")


addrec()
searchrec()
2. TABLE - STU
Rollno Name Gender Age Dept DOA Fees
1 Arun M 24 COMPUTER 1997-01-10 120
2 Ankit M 21 HISTORY 1998-03-24 200
3 Anu F 20 HINDI 1996-12-12 300
4 Bala M 19 NULL 1999-07-01 400
5 Charan M 18 HINDI 1997-09-05 250
6 Deepa F 19 HISTORY 1997-06-27 300
7 Dinesh M 22 COMPUTER 1997-02-25 210
8 Usha F 23 NULL 1997-07-31 200
(CREATE DATABASE, USE, CREATE TABLE, INSERT COMMANDS ARE MANDATORY)

- CREATE DATABASE DATABASE_NAME;


- USE DATABASE_NAME;
- CREATE TABLE STU(ROLLNO INT PRIMARY KEY,NAME VARCHAR(10), GENDER VARCHAR(3),
AGE INT,DEPT VARCHAR(15),DOA DATE,FEES INT);
- INSERT INTO STU VALUES (1,'Arun','M', 24,'COMPUTER','1997-01-10', 120);
- INSERT INTO STU VALUES (2,'Ankit','M', 21,'HISTORY','1998-03-24', 200);
- INSERT INTO STU VALUES (3,'Anu','F', 20,'HINDI','1996-12-12', 300);
- INSERT INTO STU VALUES (4,'Bala','M', 19, NULL,'1999-07-01', 400);
- INSERT INTO STU VALUES (5,'Charan','M', 18,'HINDI','1997-06-27', 250);
- INSERT INTO STU VALUES (6,'Deepa','F', 19,'HISTORY','1997-06-27', 300);
- INSERT INTO STU VALUES (7,'Dinesh','M', 22,'COMPUTER','1997-02-25', 210);
- INSERT INTO STU VALUES (8,'Usha','F', 23, NULL,'1997-07-31', 200);

(a) Write a Query to list name of female students in Hindi Department.


ANS) SELECT NAME FROM STU WHERE DEPT='HINDI' AND GENDER='F';

(b) Write a Query to list name of the students whose age’s are between 18 to 20.
ANS) SELECT NAME FROM STU WHERE AGE BETWEEN 18 AND 20;

(c) Write a Query to display the names of the students whose name is starting with 'A'.
ANS) SELECT NAME FROM STU WHERE NAME LIKE 'A%';

(d) Write a query to list the names of those students whose name have second alphabet
'n' in their names.
ANS) SELECT NAME FROM STU WHERE NAME LIKE '_N%';
SET – 4
1. Creating a python program to copy particular lines of a text file into
another text file.
ANS)
f=open('sample.txt', 'r')
a=f.readlines()
f.close()
f=open('sample.txt','w')
f1=open('sample1.txt','w')
for i in a:
if ('a' in i )or ('A' in i):
f1.write(i)
else:
f.write(i)
f.close()
f1.close()

2. TABLE - STU
Rollno Name Gender Age Dept DOA Fees
1 Arun M 24 COMPUTER 1997-01-10 120
2 Ankit M 21 HISTORY 1998-03-24 200
3 Anu F 20 HINDI 1996-12-12 300
4 Bala M 19 NULL 1999-07-01 400
5 Charan M 18 HINDI 1997-09-05 250
6 Deepa F 19 HISTORY 1997-06-27 300
7 Dinesh M 22 COMPUTER 1997-02-25 210
8 Usha F 23 NULL 1997-07-31 200
(CREATE DATABASE, USE, CREATE TABLE, INSERT COMMANDS ARE MANDATORY)

- CREATE DATABASE DATABASE_NAME;


- USE DATABASE_NAME;
- CREATE TABLE STU(ROLLNO INT PRIMARY KEY,NAME VARCHAR(10), GENDER VARCHAR(3),
AGE INT,DEPT VARCHAR(15),DOA DATE,FEES INT);
- INSERT INTO STU VALUES (1,'Arun','M', 24,'COMPUTER','1997-01-10', 120);
- INSERT INTO STU VALUES (2,'Ankit','M', 21,'HISTORY','1998-03-24', 200);
- INSERT INTO STU VALUES (3,'Anu','F', 20,'HINDI','1996-12-12', 300);
- INSERT INTO STU VALUES (4,'Bala','M', 19, NULL,'1999-07-01', 400);
- INSERT INTO STU VALUES (5,'Charan','M', 18,'HINDI','1997-06-27', 250);
- INSERT INTO STU VALUES (6,'Deepa','F', 19,'HISTORY','1997-06-27', 300);
- INSERT INTO STU VALUES (7,'Dinesh','M', 22,'COMPUTER','1997-02-25', 210);
- INSERT INTO STU VALUES (8,'Usha','F', 23, NULL,'1997-07-31', 200);
(a) Write a Query to delete the details of Roll number 8.
ANS) DELETE FROM STU WHERE ROLLNO=8;

(b) Write a Query to change the fess of Student to 170 whose Roll number is 1, if
the existing fess is less than 130.
ANS) UPDATE STU SET FEES=170 WHERE ROLLNO=1 AND FEES<130;

(c) Write a Query to add a new column named Area of type varchar in table STU.
ANS) ALTER TABLE STU ADD AREA VARCHAR(20);

(d) Write a Query to Display Name of all students whose Area Contains NULL.
ANS) SELECT NAME FROM STU WHERE AREA IS NULL;

(e) Write a Query to delete Area Column from the table STU.
ANS) ALTER TABLE STU DROP AREA;

(f) Write a Query to delete table from Database.


ANS) DROP TABLE STU;
SET – 5
1. Creating a python program to read a text file and display the number
of vowels/consonants/lower case/ upper case characters.
ANS)
a=open('sample.txt','r')
b=a.read()
v=c=u=l=0
for i in b:
if i.isalpha():
if i in 'aeiouAEIOU':
v+=1
else:
c+=1
if i.isupper():
u+=1
elif i.islower():
l+=1
print("The number of vowels in the file is :",v)
print("The number of consonants in the file is :",c)
print("The number of upper case letters in the file is :",u)
print("The number of lower case letters in the file is :",l)
a.close()

2. TABLE - STU
Rollno Name Gender Age Dept DOA Fees
1 Arun M 24 COMPUTER 1997-01-10 120
2 Ankit M 21 HISTORY 1998-03-24 200
3 Anu F 20 HINDI 1996-12-12 300
4 Bala M 19 NULL 1999-07-01 400
5 Charan M 18 HINDI 1997-09-05 250
6 Deepa F 19 HISTORY 1997-06-27 300
7 Dinesh M 22 COMPUTER 1997-02-25 210
8 Usha F 23 NULL 1997-07-31 200
(CREATE DATABASE, USE, CREATE TABLE, INSERT COMMANDS ARE MANDATORY)

- CREATE DATABASE DATABASE_NAME;


- USE DATABASE_NAME;
- CREATE TABLE STU(ROLLNO INT PRIMARY KEY,NAME VARCHAR(10), GENDER VARCHAR(3),
AGE INT,DEPT VARCHAR(15),DOA DATE,FEES INT);
- INSERT INTO STU VALUES (1,'Arun','M', 24,'COMPUTER','1997-01-10', 120);
- INSERT INTO STU VALUES (2,'Ankit','M', 21,'HISTORY','1998-03-24', 200);
- INSERT INTO STU VALUES (3,'Anu','F', 20,'HINDI','1996-12-12', 300);
- INSERT INTO STU VALUES (4,'Bala','M', 19, NULL,'1999-07-01', 400);
- INSERT INTO STU VALUES (5,'Charan','M', 18,'HINDI','1997-06-27', 250);
- INSERT INTO STU VALUES (6,'Deepa','F', 19,'HISTORY','1997-06-27', 300);
- INSERT INTO STU VALUES (7,'Dinesh','M', 22,'COMPUTER','1997-02-25', 210);
- INSERT INTO STU VALUES (8,'Usha','F', 23, NULL,'1997-07-31', 200);

(f) Write a Query to Create a new database in the name of "STUDENTS".


ANS) CREATE DATABASE STUDENTS;

(g) Write a Query to Open the database "STUDENTS".


ANS) USE STUDENTS;

(h) Write a Query to create the above table called: "STU"


ANS) CREATE TABLE STU(ROLLNO INT PRIMARY KEY,NAME VARCHAR(10), GENDER VARCHAR(3),
AGE INT,DEPT VARCHAR(15),DOA DATE,FEES INT);

(i) Write a Query to list all the existing database names


ANS) SHOW DATABASES;

(j) Write a Query to List all the tables that exists in the current database.
ANS) SHOW TABLES;
SET – 6
1. Creating a python program to read a text file line by line and display
each word separated by '#'.
ANS)
a=open('sample.txt','r')
b=a.readline()
while b:
c=b.split()
for i in range(len(c)-1):
print(c[i],'#',end='')
print(c[-1])
print()
b=a.readline()
a.close()

3. TABLE - STU
Rollno Name Gender Age Dept DOA Fees
1 Arun M 24 COMPUTER 1997-01-10 120
2 Ankit M 21 HISTORY 1998-03-24 200
3 Anu F 20 HINDI 1996-12-12 300
4 Bala M 19 NULL 1999-07-01 400
5 Charan M 18 HINDI 1997-09-05 250
6 Deepa F 19 HISTORY 1997-06-27 300
7 Dinesh M 22 COMPUTER 1997-02-25 210
8 Usha F 23 NULL 1997-07-31 200
(CREATE DATABASE, USE, CREATE TABLE, INSERT COMMANDS ARE MANDATORY)

- CREATE DATABASE DATABASE_NAME;


- USE DATABASE_NAME;
- CREATE TABLE STU(ROLLNO INT PRIMARY KEY,NAME VARCHAR(10), GENDER VARCHAR(3),
AGE INT,DEPT VARCHAR(15),DOA DATE,FEES INT);
- INSERT INTO STU VALUES (1,'Arun','M', 24,'COMPUTER','1997-01-10', 120);
- INSERT INTO STU VALUES (2,'Ankit','M', 21,'HISTORY','1998-03-24', 200);
- INSERT INTO STU VALUES (3,'Anu','F', 20,'HINDI','1996-12-12', 300);
- INSERT INTO STU VALUES (4,'Bala','M', 19, NULL,'1999-07-01', 400);
- INSERT INTO STU VALUES (5,'Charan','M', 18,'HINDI','1997-06-27', 250);
- INSERT INTO STU VALUES (6,'Deepa','F', 19,'HISTORY','1997-06-27', 300);
- INSERT INTO STU VALUES (7,'Dinesh','M', 22,'COMPUTER','1997-02-25', 210);
- INSERT INTO STU VALUES (8,'Usha','F', 23, NULL,'1997-07-31', 200);
(a) Write a Query to insert all the rows above.
ANS) ALL THE ABOVE INSERT COMMANDS

(b) Write a Query to display all the details of the Employees from the above table 'STU'.
ANS) SELECT * FROM STU;

(f) Write a query to display Rollno, Name and Department from STU table.
ANS) SELECT ROLLNO,NAME,DEPT FROM STU;

(g) Write a Query to display distinct Department from STU table.


ANS) SELECT DISTICT(DEPT) FROM STU;

(h) To show all information about students of History department.


ANS) SELECT * FROM STU WHERE DEPT='HISTORY';
SET – 7
1. Read a text file and count the number of occurrence of the particular
word in the file content.
ANS)
a=open("sample.txt",'r')
b=a.read()
c=b.split()
d=0
w=input("Enter the word which you want to count:")
for i in c:
if i.lower()==w:
d+=1
if d==0:
print("The given word",w,"not found in the file content")
else:
print("The given word",w,"found",d,"time(s) in the file content")

3. TABLE - STU
Rollno Name Gender Age Dept DOA Fees
1 Arun M 24 COMPUTER 1997-01-10 120
2 Ankit M 21 HISTORY 1998-03-24 200
3 Anu F 20 HINDI 1996-12-12 300
4 Bala M 19 NULL 1999-07-01 400
5 Charan M 18 HINDI 1997-09-05 250
6 Deepa F 19 HISTORY 1997-06-27 300
7 Dinesh M 22 COMPUTER 1997-02-25 210
8 Usha F 23 NULL 1997-07-31 200
(CREATE DATABASE, USE, CREATE TABLE, INSERT COMMANDS ARE MANDATORY)

- CREATE DATABASE DATABASE_NAME;


- USE DATABASE_NAME;
- CREATE TABLE STU(ROLLNO INT PRIMARY KEY,NAME VARCHAR(10), GENDER VARCHAR(3),
AGE INT,DEPT VARCHAR(15),DOA DATE,FEES INT);
- INSERT INTO STU VALUES (1,'Arun','M', 24,'COMPUTER','1997-01-10', 120);
- INSERT INTO STU VALUES (2,'Ankit','M', 21,'HISTORY','1998-03-24', 200);
- INSERT INTO STU VALUES (3,'Anu','F', 20,'HINDI','1996-12-12', 300);
- INSERT INTO STU VALUES (4,'Bala','M', 19, NULL,'1999-07-01', 400);
- INSERT INTO STU VALUES (5,'Charan','M', 18,'HINDI','1997-06-27', 250);
- INSERT INTO STU VALUES (6,'Deepa','F', 19,'HISTORY','1997-06-27', 300);
- INSERT INTO STU VALUES (7,'Dinesh','M', 22,'COMPUTER','1997-02-25', 210);
- INSERT INTO STU VALUES (8,'Usha','F', 23, NULL,'1997-07-31', 200);
(a) Write a Query to list name of female students in Hindi Department.
ANS) SELECT NAME FROM STU WHERE DEPT='HINDI' AND GENDER='F';

(b) Write a Query to list name of the students whose age’s are between 18 to 20.
ANS) SELECT NAME FROM STU WHERE AGE BETWEEN 18 AND 20;

(e) Write a Query to display the names of the students whose name is starting with 'A'.
ANS) SELECT NAME FROM STU WHERE NAME LIKE 'A%';

(f) Write a query to list the names of those students whose name have second alphabet
'n' in their names.
ANS) SELECT NAME FROM STU WHERE NAME LIKE '_N%';
SET – 8
1. Creating a python program to generate random number between
1 to 6.
ANS)
import random
print("Dice game ")
print("Game starts...")
ans='yes'
while ans.lower()=='yes':
print("Dice rolling ")
s=random.randint(1,6)
print("You got:",s)
ans=input("Do you want to roll again the dice (yes/no):")
print("See you again.. Bye")

2. (CREATE DATABASE, USE, CREATE TABLE, INSERT COMMANDS ARE MANDATORY)


TABLE: COST TABLE: UNIFORM
Ucode Uname Ucolor StockDate Ucode Size Price Company
1 Shirt White 2021-03-31 1 M 500 Raymond
2 Pant Black 2020-01-01 1 L 580 Mattex
3 Skirt Grey 2021-02-18 2 XL 620 Mattex
4 Tie Blue 2019-01-01 2 M 810 Yasin
5 Socks Blue 2019-03-19 2 L 940 Raymond
6 Belt Black 2017-12-09 3 M 770 Yasin
3 L 830 Galin
4 S 150 Mattex

- CREATE DATABASE DATABASE_NAME;


- USE DATABASE_NAME;
- CREATE TABLE COST ( Ucode INT PRIMARY KEY, Uname VARCHAR(50), Ucolor VARCHAR(20),
StockDate DATE );
- INSERT INTO COST VALUES
(1, 'Shirt', 'White', '2021-03-31'),
(2, 'Pant', 'Black', '2020-01-01'),
(3, 'Skirt', 'Grey', '2021-02-18'),
(4, 'Tie', 'Blue', '2019-01-01'),
(5, 'Socks', 'Blue', '2019-03-19'),
(6, 'Belt', 'Black', '2017-12-09');
- CREATE TABLE Uniform ( Ucode INT, Size VARCHAR(5), Price float(10, 2), Company
VARCHAR(50), PRIMARY KEY (Ucode, Size) );
- INSERT INTO Uniform VALUES
(1, 'M', 500, 'Raymond'),
(1, 'L', 580, 'Mattex'),
(2, 'XL', 620, 'Mattex'),
(2, 'M', 810, 'Yasin'),
(2, 'L', 940, 'Raymond'),
(3, 'M', 770, 'Yasin'),
(3, 'L', 830, 'Galin'),
(4, 'S', 150, 'Mattex');

a) To Display the average price of all the Uniform of Raymond Company from table COST.
ANS) SELECT AVG(PRICE) FROM COST WHERE COMPANY='RAYMOND';

b) To display details of all the Uniform in the Uniform table in descending order of Stock
date.
ANS) SELECT * FROM UNIFORM ORDER BY STOCKDATE DESC;

c) To Display max price and min price of each company.


ANS) SELECT COMPANY,MAX(PRICE),MIN(PRICE) FROM COST GROUP BY COMPANY;

d) To display the company where the number of uniforms size is more than 2.
ANS) SELECT COMPANY, COUNT(*) FROM COST GROUP BY COMPANY HAVING
COUNT(*)>2;

e) To display the Ucode, Uname, Ucolor, Size and Company of tables uniform and cost.
ANS) SELECT U.UCODE,UNAME,UCOLOR,SIZE,COMPANY FROM UNIFORM U,COST C
WHEREU.UCODE=C.UCODE;

You might also like