首页 > 代码库 > sql sever 基础 练习题

sql sever 基础 练习题

--1. 求半径2米,高3米的圆柱体体积。
declare @high float
declare @r float
declare @pai float
declare @v float
set @high=3
set @r=2
set @pai=3.14
set @v=@r*@r*@pai*@high
print ‘体积为‘+convert(varchar(20),@v)+‘立方米‘

技术分享
declear @hight float,@r float,@ratio float ,@ v float
set @hight=3
set @r=2
set @ratio =3.14
set @v=@hight*@r*@r*@ratio
print 体积为+convert(varchar(20),@v)+立方米
View Code

 

sql sever 基础 练习题