
sqlserver
Talers69
青春活力,热爱运动。
展开
-
mysql 之序列表,自增id作用
// 序列表 Drop table if exists sequence; create table if not exists sequence( `name` varchar(50) not null, `current_value` int(11) not null, `increment` int(11) not null default '1'原创 2017-05-27 16:55:53 · 2007 阅读 · 0 评论 -
sql Server 的 sql 语句收入
每个用户在 从表(t) 只获取一条 最新的 记录。适用于一对多,但每个主表记录只查询一条从表记录的情况。 addtime -- 添加时间 userid -- 外键 select top 10 title from t where addtime in (select max(addtime) from t group by userid) 参考网址: http://zhidao.bai转载 2017-03-30 16:47:37 · 480 阅读 · 0 评论