`
yacole
  • 浏览: 238614 次
  • 性别: Icon_minigender_1
  • 来自: 浙江科技学院
社区版块
存档分类
最新评论

select max

阅读更多

select * from [user] where id=(select max(id) from [user])

分享到:
评论

相关推荐

    Oracle练习笔试大全

    61、select ename, sal from emp join (select max(sal) max_sal ,deptno from emp group by deptno) t on (emp.sal = t.max_sal and emp.deptno=t.deptno); //查询每个部门中工资最高的那个人 ///////////////////...

    超实用sql语句

    select a.title,a.username,b.adddate from table a,(select max(adddate) adddate from table where table.title=a.title) b 6、说明:外连接查询(表名1:a 表名2:b) select a.a, a.b, a.c, b.c, b.d, b.f from a ...

    mysql数据库的基本操作语法

    insert into temp(name) select name from classes; 多行插入 insert into temp values(null, ‘jack’, 22), (null, ‘jackson’ 23); 2、 update 修改语句 update主要完成对数据的修改操作,可以修改一条或多...

    sql server 分页

    where id>(select max(id) from (select top 开始位置 id from table1 order by id)tt) SELECT TOP 10 * from Lend WHERE id> (SELECT MAX(id) FROM (SELECT top 10 id FROM Lend ORDER BY id) M)

    精髓Oralcle讲课笔记

    61、select ename, sal from emp join (select max(sal) max_sal ,deptno from emp group by deptno) t on (emp.sal = t.max_sal and emp.deptno=t.deptno); --查询每个部门中工资最高的那个人 -----------------...

    MYSSQL_MSS_ORACLE经典SQL.pdf

    SELECT max(Z.T#) AS 教师ID,MAX(Z.Tname) AS 教师姓名,C.C# AS 课程ID,MAX(C.Cname) AS 课程名称,AVG(Score) AS 平均成绩 FROM SC AS T,Course AS C ,Teacher AS Z where T.C#=C.C# and C.T#=Z.T# GROUP ...

    50个常用SQL语句,很好

    SELECT max(Z.T#) AS 教师ID,MAX(Z.Tname) AS 教师姓名,C.C# AS 课程ID,MAX(C.Cname) AS 课程名称,AVG(Score) AS 平均成绩 FROM SC AS T,Course AS C ,Teacher AS Z where T.C#=C.C# and C.T#=Z.T# GROUP ...

    经典SQL语句大全

    select a.title,a.username,b.adddate from table a,(select max(adddate) adddate from table where table.title=a.title) b 6、说明:外连接查询(表名1:a 表名2:b) select a.a, a.b, a.c, b.c, b.d, b.f from a ...

    数据库操作语句大全(sql)

    select a.title,a.username,b.adddate from table a,(select max(adddate) adddate from table where table.title=a.title) b 6、说明:外连接查询(表名1:a 表名2:b) select a.a, a.b, a.c, b.c, b.d, b.f from a...

    Delphi 聚集函数MAX查询数据最多项内容.rar

     SQL.Add('Select * From tb_sell where 数量=(Select max(数量) From Tb_sell where month(日期)=7)');  open;  end;  for i := 0 to 6 do  begin  dbgrid1.Fields[i].DisplayWidth:=8;  end;  完整的带...

    sql经典语句一部分

    select a.title,a.username,b.adddate from table a,(select max(adddate) adddate from table where table.title=a.title) b 6、说明:外连接查询(表名1:a 表名2:b) select a.a, a.b, a.c, b.c, b.d, b.f from a ...

    物业管理系统

    ‘ndialogtype=4+32nAnswer=messagebox(cmessagetext,ndialogtype,cmessagetitle)do case case nAnswer=6 i=1 for i=cstart to cend xqno=alltrim(str(i)) select *; from databasewuyemanage!tabxqinfo; where 小区...

    net学习笔记及其他代码应用

    解2: select top 10 * from A where id > (select max(id) from (select top 30 id from A )as A) 34.面向对象的语言具有________性、_________性、________性 答:封装、继承、多态。 35.能用foreach遍历访问的...

    java jdbc 线程插入记录

    select max(num),min(num),avg(num) from ( select count(*) num, evt_time from level2faulttxt where evt_time>(select min(evt_time) from level2faulttxt ) and evt_time<(select max(evt_time) from level2...

    java jdbc 利用 bonecp 四线程同时向四张表插入记录

    select max(num),min(num),avg(num) from ( select count(*) num, evt_time from level2faulttxt where evt_time > (select min(evt_time) from level2faulttxt) and evt_time (select max(evt_time) from level2...

    oracle学习文档 笔记 全面 深刻 详细 通俗易懂 doc word格式 清晰 连接字符串

     DELETE_CATALOG_ROLE, EXECUTE_CATALOG_ROLE,SELECT_CATALOG_ROLE这些角色主要用于访问数据字典视图和包。  EXP_FULL_DATABASE, IMP_FULL_DATABASE这两个角色用于数据导入导出工具的使用。  自定义角色 ...

    sql语句大全 包括常有语句 新手必备

    select a,b,c from tablename ta where a=(select max(a) from tablename tb where tb.b=ta.b) 16、说明:包括所有在 TableA 中但不在 TableB和TableC 中的行并消除所有重复行而派生出一个结果表 (select a from ...

    去掉重复记录select * from

    select * from company where comid in (select Max(comid) from company group by companyname)得到重复记录数

    Hibernate实例 oracel数据库

    这是一个Hibernate实例 使用oracel数据库 并用junit和自定义类分别进行了测试

    MySQL数据库优化SQL

    having avg(sal) = (select max(avg(sal)) from emp group by deptno)); select dname from dept where deptno = (select deptno from emp group by deptno having avg(sal) = (select max(avg(sal)) from emp ...

Global site tag (gtag.js) - Google Analytics