数据库查询(主键作为条件)
2016-05-04 16:30
375 查看
select * from tablename where Id =(select max(id) from tablename where 字段='xxx‘);
相关文章推荐
- log4j2.xml打印mybatis的sql语句
- redis学习笔记(3)---字典dict
- MySQL主从复制中断,报“Error on master: message (format)='Cannot delete or update a parent row: a foreign key constraint fails' error code=1217” 错误
- MySQL索引原理及慢查询优化
- Memcached详解(较详细)
- Oracle之NVL函数
- MySQL Cannot Connect to Database Server
- SQL> set autotrace traceonly SP2-0618: Cannot find the Session Identifier. Check PLUSTRACE role is
- MongoDB使用
- 在安装mysqli的时候,出现error: ext/mysqlnd/mysql_float_to_double.h: No such file or direc
- mysql5.5不能同时设置两个字段为CURRENT_TIMESTAMP
- 查询表结构信息
- 一种Oracle Net Manager配置连接不成功的处理
- MYSQL必知必会读书笔记 第七章 数据过滤
- Spring+Mongodb开发记录
- SQL serve创建与调用存储过程
- mysql导出视图没有权限
- Oracle之根据日期查询
- php不支持redis
- Tomcat + Nginx + 主从 memcached + keepalived 实现高可靠的web 服务