用SQL查詢我可以order by
N,其中N是列索引。例如nHibernate用SQL Server排序N
SELECT name, salary FROM employee ORDER BY 2;
我該怎麼用nHibernate做這件事?
用SQL查詢我可以order by
N,其中N是列索引。例如nHibernate用SQL Server排序N
SELECT name, salary FROM employee ORDER BY 2;
我該怎麼用nHibernate做這件事?
按順序排序是一個壞習慣 - 如果列的順序發生變化,您的排序也會發生變化。 – 2009-10-27 19:53:32