Guest User

Untitled

a guest
Feb 19th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. CREATE DEFINER = 'root'@'localhost'
  2. FUNCTION football.func_3(T_id integer(10))
  3. RETURNS INT
  4. BEGIN
  5. select count(*)
  6. FROM teams, games
  7. WHERE ((teams.Team_id=games.Team_1_id
  8. AND teams.id=T_id ) OR
  9. (teams.Team_id=games.Team_2_id
  10. AND teams.id=T_id));
  11. RETURN 1;
  12. END
Add Comment
Please, Sign In to add comment