mysql row number的实现
CREATE TABLE `test_id` (
`id` int(11) NOT NULL DEFAULT 0 ,
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'XX' ,
PRIMARY KEY (`id`)
)
select count(*),t1.`name` from test_id t1
INNER JOIN test_id t2
on t1.id >= t2.id
group by t1.id,t1.`name`
结果
1 XX1
2 XX2
3 XX3
4 XX5
5 XX7
6 XX9
mysql row number的实现的更多相关文章
- MySQL Error Number 1005 Can’t create table(Errno:150)
mysql数据库1005错误解决方法 MySQL Error Number 1005 Can’t create table ‘.\mydb\#sql-328_45.frm’ (errno: 150) ...
- poi excel超出65536行数限制自动扩展Invalid row number (65536) outside allow
1.xls一个sheet只能装65536行,多余则报错 poi包导出或写入excel超出65536报错: java.lang.IllegalArgumentException: Invalid row ...
- 转:MySQL Row Format(MySQL行格式详解)
MySQL Row Format(MySQL行格式详解) --转载自登博的博客
- C# Excel导出超出65536行报错 Invalid row number (65536) outside allowable range (0..65535)
C# Excel导出超出65536行报错 Invalid row number (65536) outside allowable range (0..65535) 一:报错 Invalid row ...
- mysql row日志格式下 查看binlog sql语句
有时候我们需要使用row作为binlog的日志格式,即配置文件使用了binlog_format= row 参数 这样以来,我们在查看数据库binlog内容时候,就看不到增删改查的具体语句了,在数据库恢 ...
- mysql row size上限
mysql innodb 的 row size上限 背景 在项目使用中,出现了以下报错: Error Code: 1118 - Row size too large (> 8126). Chan ...
- MySQL row模式binlog复制原理
http://www.360doc.com/content/14/1107/14/12904276_423333021.shtml
- update mysql row (You can't specify target table 'x' for update in FROM clause)
sql语句(update/delete都会出现此问题) update x set available_material_id = null where id not in (select id fro ...
- mysql quick query row count using sql
1. command show table status like '{table-name}'; 2. sample mysql> use inventory; Database change ...
随机推荐
- rnn lstm
资料收集:https://github.com/kjw0612/awesome-rnn 代码+例子+物理意义:https://iamtrask.github.io/2015/11/15/anyone- ...
- node实现http上传文件进度条 -我们到底能走多远系列(37)
我们到底能走多远系列(37) 扯淡: 又到了一年一度的跳槽季,相信你一定准备好了,每每跳槽,总有好多的路让你选,我们的未来也正是这一个个选择机会组合起来的结果,所以尽可能的找出自己想要的是什么再做决定 ...
- Nginx 的线程池与性能剖析
http://blog.yemou.net/article/query/info/tytfjhfascvhzxcyt158 正如我们所知,NGINX采用了异步.事件驱动的方法来处理连接.这种处理方 ...
- CI 框架隐藏index.php-ubuntu
和朋友在做一个小网站,用到了CI框架,之前测试都是在windows上,隐藏index.php也相对比较简单.但服务器是ubuntu系统,需要配置一下,根据网上看到的一些教程,结合自己电脑的特点,记录步 ...
- 从源码安装pip
由于服务器不能外网,只能通过从网上下载源码包的方式进行安装 下载地址 setuptools pip 安装步骤 首先需要安装setuptools,否则直接安装pip会提示没有setuptools $ t ...
- Linux磁盘文件的命名
磁盘的常用接口有两种:IDE和SATA接口,目前主流的是SATA接口. IDE接口由IDE扁平电缆线连接,一个电缆可连接两个IDE接口,通常主机又都会提供两个IDE接口,因此最多可以接到四个IDE设备 ...
- 279. Perfect Squares
Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 1 ...
- 310. Minimum Height Trees
For a undirected graph with tree characteristics, we can choose any node as the root. The result gra ...
- poj 3159 dijkstra 最短路
Description During the kindergarten days, flymouse was the monitor of his class. Occasionally the he ...
- POJ 1797 Heavy Transportation
题目链接:http://poj.org/problem?id=1797 Heavy Transportation Time Limit: 3000MS Memory Limit: 30000K T ...