DIGIT-ARC read-only archive · snapshot: July 23, 2026

Creating a trigger, function and a procedure in SQL

2 posts · originally from https://geek.digit.in/community/threads/creating-a-trigger-function-and-a-procedure-in-sql.187631/

R
rakesh-the gilli Original post #1
Oct 11, 2014 at 1:28 PM
Hi,

I have 3 tables namely,

1) Vehicle (vehid, vehno, type, seats, status)
2) Driver (drid, dname, phno, address, status)
3) Hiring (hid, hdate, vehid, drid)

How can i create a trigger that checks the status of vehicle and driver for hiring
How to create a function that returns the number of vehicles that are available for hiring and
How to create a procedure which prints the hiring information with corresponding vehicle and driver information.
Vyom
Vyom #2
Oct 13, 2014 at 10:56 AM
This is not "complete your homework" forum.
It's best if you try them on your own after reading some sample triggers/functions and then ask your queries by posting what you think should work.