下面是我的SQL Server 2012查询示例。如何添加额外的列“StaffNo”以显示增量整数?
我的疑问:
Staff CaseNumber
Joe 5880
Joe 4489
Joe 2235
Emily 7790
Emily 8813
预期结果:
Staff CaseNumber StaffNo
Joe 5880 1
Joe 4489 1
Joe 2235 1
Emily 7790 2
Emily 8813 2
答案 0 :(得分:0)
在整个桌子上使用import 'dart:async';
import 'package:flutter/material.dart';
void main() {
runApp(new MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
home: new HomePage(),
);
}
}
class HomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new Scaffold(
floatingActionButton: new FloatingActionButton(
child: new Icon(Icons.developer_board),
onPressed: () {
Navigator.of(context).push(
new MaterialPageRoute(builder: (_) => new MySecondPage()),
);
},
),
);
}
}
class MySecondPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new Scaffold(
appBar: new AppBar(
title: new Text('Developer Mode'),
),
body: new MySecondPageBody(),
);
}
}
class MySecondPageBody extends StatefulWidget {
@override
State createState() => new MySecondPageBodyState();
}
class MySecondPageBodyState extends State<MySecondPageBody> {
@override
void initState() {
new Future<Null>.delayed(Duration.ZERO, () {
Scaffold.of(context).showSnackBar(
new SnackBar(content: new Text("You made it! Congrats.")),
);
});
super.initState();
}
@override
Widget build(BuildContext context) {
return new Center(
child: new Text('You are now a developer.'),
);
}
}
,没有分区,并按工作人员的名字排序。
DENSE_RANK
在这里演示: