Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DO $$
- DECLARE
- test_score INTEGER = random()*10;
- BEGIN
- CASE
- WHEN test_score BETWEEN 0 AND 4
- THEN RAISE notice 'your test score is % and that is realy bad, you must have more learning if you want to pass the exam', test_score;
- WHEN test_score BETWEEN 5 AND 7
- THEN RAISE notice 'your test score is % and what job will you get with that score,(if I were you I will go
- self-taught and learn other things that you cannot learn just from school ;), if you don''t wana be a civil servant, )', test_score;
- WHEN test_score BETWEEN 8 AND 10
- THEN RAISE notice 'your test score is % and that is a good job, bot don''t be proud of that or you will getting your self on behind', test_score;
- ELSE
- RAISE notice 'Error';
- END CASE;
- END $$;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement