摘要:
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms; using System.Text.RegularExpressions;namespace WindowsFormsApplication1{ public partial class Form1 : Form { public Form1() 阅读全文
摘要:
我们在查询一张数据表时,如果主键ID以1为种子自增长。那么我们在查询制定条数的时候非常方便,只要以ID为条件查询需要的数据即可。或者配合TOP语法也可。但如果遇到主键不以1为自增长,且主键的数据没有规律,例如以GUID生成,那么例如我们在查询第8到第17条数据的时候非常不方便。之前的方法完全无法使用。不过现在有一个row_number可以帮助我们。贴出sql查询语句with tempTableas (select ROW_NUMBER() over(order by ID) as rowid,* from PensonTable)select * from tempTable where ro 阅读全文