Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE DEFINER = 'root'@'localhost'
- FUNCTION football.func_3(T_id integer(10))
- RETURNS INT
- BEGIN
- select count(*)
- FROM teams, games
- WHERE ((teams.Team_id=games.Team_1_id
- AND teams.id=T_id ) OR
- (teams.Team_id=games.Team_2_id
- AND teams.id=T_id));
- RETURN 1;
- END
Add Comment
Please, Sign In to add comment