You are on page 1of 1

1)Like

SELECT First_name from employees


WHERE First_name LIKE ‘V%’;

2)In

SELECT * FROM customer


WHERE First_name IN ('Rahul', 'Dan', 'Rohan');

AND
SELECT First_name from employees
WHERE First_name LIKE ‘l% AND First_Name LIKE ‘A%’ ;

3) Create a table with the following order( orderid, item


1,item2, adress , price) orderid is a primary key

Create Table “order”


(orderid varChar2(50) Primary key,
Item_1 varChar2(50),
Item_2 varChar2(50),
Address varChar2(50),
Price number(20));

4)How to print a content in descending order

SELECT *
FROM Product
ORDER BY
Price DESC;

5)Add a column to the above table

ALTER TABLE Order


ADD Bill_id varchar2(50) ;

6)Write the command to create a foreign key ( use a table of your choice)

Create Table “order”


(orderid varChar2(50) Primary key,
Item_1 varChar2(50),
Item_2 varChar2(50),
Address varChar2(50),
Price number(20),
FOREIGN KEY (C_id) REFERENCES Customer(C_id) );

You might also like