SELECT @row := @row + 1 as row, t.id FROM sgcorp_product t, (SELECT @row := 0) r where t.id not in(select product_id from sgcorp_pic)
http://database.51cto.com/art/201011/235142.htm
咔咔是咖咖 ©著作权
文章标签 java 文章分类 JavaScript 前端开发
SELECT @row := @row + 1 as row, t.id FROM sgcorp_product t, (SELECT @row := 0) r where t.id not in(select product_id from sgcorp_pic)
http://database.51cto.com/art/201011/235142.htm
select (@i:=@i+1) as i,t.id from table t,(select @i:=0) as xh
SQL 基础使用MySQL 是一种关系型数据库,说到关系,那么就离不开表与表之间的关系,而最能体现这种关系的其实就是我们接下来需要介绍的主角 SQL,SQL 的全称是 Structure Query Language ,结构化的查询语言,它是一种针对表关联关系所设计的一门语言,也就是说,学好 MySQL,SQL 是基础和重中之重。SQL 不只是 MySQL 中特有的一门
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M