Home > Database > Mysql Tutorial > mysql在已有的表中插入记录行号_MySQL

mysql在已有的表中插入记录行号_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-01 13:43:32
Original
1132 people have browsed it

bitsCN.com
mysql在已有的表中插入记录行号 1.先在已有的表中增加一列,用这一列来存记录行号
2.将记录行号插入表的这个新增字段中如:SET @mycnt = 0; UPDATE datamanagementSET rownum=(@mycnt := @mycnt + 1)WHERE industryid='38'ORDER BY dataid   作者 zdk8105 bitsCN.com

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template