0% found this document useful (0 votes)
2 views

Lab Asignment-4. Date Time

The document outlines a series of SQL queries related to date functions and employee data management. It includes tasks such as displaying the system date, checking AM/PM, and creating an EMP table with specific queries about employee joining dates. Additionally, it covers creating a Train table and performing operations related to train schedules.

Uploaded by

kanz2912
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Lab Asignment-4. Date Time

The document outlines a series of SQL queries related to date functions and employee data management. It includes tasks such as displaying the system date, checking AM/PM, and creating an EMP table with specific queries about employee joining dates. Additionally, it covers creating a Train table and performing operations related to train schedules.

Uploaded by

kanz2912
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Assignment-4

(Working on Date Functions)

Write queries to:


1. Display the system date

2. Display current day


3. Display current month and spell out year
4. Display spell out current date
5. Check whether it is AM or PM right now
6. Display the date of next Friday
7. Round the system date on month
8. Truncate the system date on month
9. Round the system date on year
10. Truncate the system date on year
11. Find the day after three days
Queries Based on EMP table
12. Create an EMP table (Empno number, Name Varchar2(20),
date_of_joining date)
13. Display day of date of joining column
14. Display those employees who join the company on Monday
15. Display those employees who join the company this month
16. Display those employees who join the company in last 30 days
Queries based on Train Arrival and Departure
17. Create a table Train having four columns (TrainNo Number (6)
primary key, date of departure, time of departure, time of arrival)
18. Insert five records into the table Train.
19. Display all the three records
20. Display the time values inserted in the columns
21. Display those trains which arrived on PM
22. Display train number who are going to depart in next one hour.

You might also like