首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

你,问个有关问题!

2012-04-06 
在线等你,问个问题!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!SQL code姓名年龄金额张小姐20121李小姐25254陈小姐30

在线等你,问个问题!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!



SQL code
姓名     年龄   金额张小姐    20    121李小姐    25    254陈小姐    30    365



统计年龄小于等于25岁以下的,金额




[解决办法]
SQL code
USE tempdbcreate table mytest(    [name] nvarchar(10),    age int,    price numeric(12))insert into mytest([name],age,price) values ('张小姐','20','121')insert into mytest([name],age,price) values ('李小姐','25','254')insert into mytest([name],age,price) values ('陈小姐','30','365')select * from mytest where age <=25SELECT sum(price) as valprice from mytest where age <=25/*375*/ 

热点排行