Lab 44
Lab 44
Lab 4
DBMS
Task 2: Display all CNAME values which end with the letters “CISM”.
Solution:-
select * from Course
Task 3: What are the names of the courses which have the letters “TA”
appearing anywhere in the name?
Solution:-
select * from Course
FROM Course
Task 5:- Display the department identifier of any course where the
department identifier ends with “IL”. Do not display duplicate values.
Solution:-
SELECT distinct CDEPT
FROM Course
FROM Course
Task 7:- Display the names of courses which have a vowel as the second
letter of their name.
Solution:-
SELECT CNAME
FROM Course
WHERE CNAME LIKE '_A%'
FROM Course
Task 9:- Display the names of all courses which do not have a vowel as the
second letter of their name.
Solution:-
SELECT CNAME
FROM Course
FROM Course
Task 11:- Create a table Person with PersonID as the primary key.
Solution:-
CREATE TABLE Person (
LastName VARCHAR(50),
FirstName VARCHAR(50),
Age INT
);
Task 12:- Create a FOREIGN KEY constraint on the "PersonID" column when
the "Orders" table is already created.
Solution:-
ALTER TABLE Orders
Task 13:- Insert at least 5 records into the Person table and 3 records into
the Orders table.
Solution:-
INSERT INTO Person (PersonID, LastName, FirstName, Age)
VALUES
VALUES