The document outlines an assignment to create and manipulate a database table named TICKET with various attributes related to ticketing information. It includes tasks such as inserting records, displaying specific data based on conditions, modifying the table structure, and performing calculations on fare data. Additionally, it requires creating related tables and copying data from the TICKET table to these new tables.
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 ratings0% found this document useful (0 votes)
5 views2 pages
LabAssignment-3[1]
The document outlines an assignment to create and manipulate a database table named TICKET with various attributes related to ticketing information. It includes tasks such as inserting records, displaying specific data based on conditions, modifying the table structure, and performing calculations on fare data. Additionally, it requires creating related tables and copying data from the TICKET table to these new tables.
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/ 2
Assignment – 3
1. Create a table in the name of TICKET having the following attributes.
Ticket No Number(5) Fare Number(10,2)
Name Varchar2(10) Category Code Varchar2(5) Gender Varchar2(6) Category Description Varchar2(25) Source Varchar2(25) Date of Issue Date Destination Varchar2(25) Date of Travel Date Distance Number(5) Departure Time Date
2. Insert at least 10 records into it.
3. Solve The following.
a. Display all the records
b. Display Name, Ticket No, Source and Destination of all passengers. c. Display only those records that originate in “Chennai”. d. Display all the records whose name starts with “A” and Destination is “Bangalore”. e. Display Fare, Source, Destination for those Distance greater than 200. f. Display those records whose Fare range between Rs. 500 to 1000. g. Display the Names of those passengers whose Date of Journey is “15-Sep-23”. h. Display the Names of passengers coming from Delhi, Mumbai, Ahmedabad or Chhattisgarh. i. Display the Names of passengers coming from Mumbai in the month of March 2021. j. Modify the table TICKET and add a new column Age with data type Number(3). k. Delete the column Category Code from the table TICKET. l. Modify the datatype of the column Name to Varchar2(25).
4. Solve the following
a. Display the average of total fare.
b. Display the name and ticket number who has paid the highest fare. c. Display the total collection of fare. d. Display the date of journey of the passenger “Ankur”. e. Display the months between date of travel and date of issue. f. Convert the first letter of the name to upper case and display. g. Update the fare whose source=” Chennai” and destination=”New Delhi”. h. Create another table with the name TICKET2 followed by registration number with the same structure as previous table and insert the rows with select clause. i. Create table Category_GEN that will store only those records of the passenger who had done reservation under general class. j. Create a table ROUTE_DETAILS with columns source, destination, distance and fare from the existing TICKET table. k. Using insert and select clause, copy all the data of TICKET into ROUTE_DETAILS. l. Count the number of rows present in ROUTE_DETAILS.