How to create a function that will return a friend's id. The friend table has two primary keys and one foreign key id from the user table

前端 未结 0 379
执念已碎
执念已碎 2021-01-24 14:00

I tried this way:

CREATE FUNCTION `num_friends`(id int) RETURNS int(11)
    DETERMINISTIC
BEGIN
    declare res int;

    select id 
    into res 
    from friend         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题