2019-06-17
阅读量:
785
mysql为变量赋值
问、mysql为变量赋值
答:
定义变量之后,通过赋值可以改变变量的
两种赋值方式
SET var name expr [,var_name=expr]…;
SELECT col_name[...] INTO varnamel.. table_expr;
·举例 SET nun=100; Select store into num from bookinfo;
案例:根据图书D查询,查询书名和库存。形式是书名-库存
create function show_ name store(bid int)
returns varchar( 50)
return(select concat_ws("----, book_name, store) from bookinfo
where book_id= bid






评论(0)


暂无数据
推荐帖子
0条评论
0条评论
0条评论