How to store Query Result in variable using mysql

后端 未结 4 1564
南旧
南旧 2020-12-04 08:28
SET @v1 := SELECT COUNT(*) FROM user_rating;
SELECT @v1

When I execute this query with set variable this error is shown.



        
4条回答
  •  情话喂你
    2020-12-04 08:33

    use this

     SELECT weight INTO @x FROM p_status where tcount=['value'] LIMIT 1;
    

    tested and workes fine...

提交回复
热议问题