社区
MS-SQL Server
帖子详情
请教高手~~,简单的SQL语句
byimbba
2006-06-16 05:10:04
我要查询 数据库 中 ,价格最贵的那本书的名称.
select book.name ,max(book.price) from bookk group by book.name
得出得数据不是我想要得,这该怎么写啊??
...全文
129
6
打赏
收藏
请教高手~~,简单的SQL语句
我要查询 数据库 中 ,价格最贵的那本书的名称. select book.name ,max(book.price) from bookk group by book.name 得出得数据不是我想要得,这该怎么写啊??
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
6 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
CNNO01
2006-06-16
打赏
举报
回复
select name,price from book where price in(select max(price) from book)
godfather_wang
2006-06-16
打赏
举报
回复
select name,maxprice from bookk a,(select max(book.price) as maxprice from bookk ) b
where a.price=b.maxprice
billpu
2006-06-16
打赏
举报
回复
select top 1 name from book order by price desc
xeqtr1982
2006-06-16
打赏
举报
回复
select name from book a where not exists(select 1 from book where name=a.name and price>a.price)
--少打了个and
xeqtr1982
2006-06-16
打赏
举报
回复
你这样应该可以阿
select name from book a where not exists(select 1 from book where name=a.name price>a.price)
xq02
2006-06-16
打赏
举报
回复
select a.name,a.price from bookk a where not exists(select * from bookk where price>a.price)
Oracle疑难解答集
以前用Oracle的时候收集的一些疑难解答,曾经帮我解决了好多问题,拿出来分享...
oracle修改的
sql语句
,
请教
oracle
高手
SQL语句
该怎么修改,如何写。
当前位置:我的异常网» Oracle开发»
请教
oracle
高手
SQL语句
该怎么修改,如何写。
请教
oracle
高手
SQL语句
该怎么修改,如何写。www.myexceptions.net网友分享于:2013-02-04浏览:18次请问oracle
高手
SQL语句
该如何修改,怎么写。急!!!后台为ORACEL数据库:select A.SORDER,A.KOTECD,A.JSTSTM,A....
java连接sqlserver语句_java连接SQLSERVER数据库和执行
SQL语句
?
我是JAVA菜鸟,
请教
高手
如何java连接SQLSERVER数据库和执行
SQL语句
?或者告诉我哪里有相关的内容也行啊,拜托!|importjava.sql.*;importjava.util.Properties;publicclassMakingAsStatement{publicstaticvoidmain(String[]args){//loaddriverclass/...
关于写
SQL语句
请教
高手
一个问题,问题描述如下: A表是各个单位的名称表 字段为 org_id 和 org_name B表是这些单位的电话号码表 字段为 org_id和 telA表 B表关联方式为A.ORG_ID=B.ORG_ID org_id是各个单位的代码org_name是各个单位的名称tel是各个单位的电话号码本人现在想针对每个单位(每条org_id)取其10个号码请问 语句应如何写?
sql常用语句汇总
只修改列的数据类型的方法: 通常可以写成 alter table 表名 modify column 列名 新的列的类型 例如:student表中列sname的类型是char(20),现在要修改为varchar(20),
SQL语句
如下 alter table student modify column sname varchar(20); 同时修改列名和列的数据类型的方法:
MS-SQL Server
34,873
社区成员
254,639
社区内容
发帖
与我相关
我的任务
MS-SQL Server
MS-SQL Server相关内容讨论专区
复制链接
扫一扫
分享
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章