Question: The problem I'm solving is below. My query works and gives me the correct answer. What I also want to do is add a dbms_output.put_line

The problem I'm solving is below. My query works and gives me the correct answer. What I also want to do is add a dbms_output.put_line to say how long the event lasted. However, I get a sql command not properly ended when I add the dbms_output line.

Question: Return start time and end time of '2018 Graduate Commencement' Hint: end time = start_time + duration

Select start_time + duration

From event

Where ename = '2018 Graduate Commencement'

dbms_output.put_line('The event lasts ' || start_time + duration);

create table event (eid int, --- event id

oid int, --- organizer id

ename varchar(50), --- event name

lid int, --- location id

start_time timestamp, -- start time of event

duration interval day to second, --- duration of event,

status int, --- 1 scheduled, 2 canceled, 3 finished

primary key(eid), foreign key (lid) references location,

foreign key (oid) references organizer);

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!