![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
mysql
Autumn秋实
我的填坑生涯
展开
-
存储过程为变量赋值的多种方式
存储过程中为变量赋值的多种方式1.select name from student where id=2 into @x;select @x; – Nacy2.select ‘Lucy’ into @x;select @x; – Lucy3.set @x=‘Lucy’;select @x;原创 2020-08-15 16:09:25 · 1337 阅读 · 0 评论 -
select 1 from table where的作用
select 1 from table where的作用select 1 from table: 增加临时列,每行的列值是写在select后的数;select sum(a): 计算临时列的和(a乘以行数)select count(1): 不管count(a)的a值如何变化,得出的值总是table表的行数;...原创 2020-08-14 13:16:11 · 228 阅读 · 0 评论