Question

##Relation Work: workld customerName totalHours jobCompleted equipment countOfWorkers day price Dog True hammer 100 Cat 2 Fal

0 0
Add a comment Improve this question Transcribed image text
Answer #1

We use stored procedure because it may or may not return value but function must return a value.

We have first change delimiter as // to mark end of strored procedure

Then write stored procedure and then change delimiter as ;

after that call procedure to display records from tables.

mysql>DELIMITER //

mysql>CREATE PROCEDURE simple()

BEGIN

SELECT day, customerName, customerAddress ,customerPhone, ID, countOfWorkers,equipment, totalHours, price FROM Work,Customer ORDER BY FIELD(day,'M','T','W','H','F');

END//

mysql>DELIMITER ;

mysql>call simple();

Add a comment
Know the answer?
Add Answer to:
##Relation Work: workld customerName totalHours jobCompleted equipment countOfWorkers day price Dog True hammer 100 Cat 2...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT