数据库分页
一个java菜鸟的成长之路
这个作者很懒,什么都没留下…
展开
-
数组的位置替换
java数组按照指定顺序排序public static void main(String[] args) { int [] s = {2,3,5,4,1}; for (int i = 0; i < s.length; i++) { if (s[i] == 1) { int n = s[i];//先new一个n来放原创 2017-05-23 11:25:10 · 1928 阅读 · 0 评论 -
sql server,mysql与oracle常见数据库的分页查询
sql server,mysql与oracle常见数据库的分页查询//sql server的分页查询废话不多说,直接上代码语法:select *,row_number () OVER(ORDER BY '字段') as '新列名' from tableSELECT *FROM ( SELECT *, row_number () OVER原创 2017-05-22 10:24:07 · 415 阅读 · 0 评论 -
sql 去重 (DISTINCT)详解
//直接上sqlSELECT DISTINCT up.usersid, rs.NewName, el.LevelName, u.Account, ui.Name, ui.IconFROM UsersPower upLEFT JOIN RoleSet rs ON rs.Num = up.RoleIdLEFT JOIN Department原创 2017-06-09 11:37:18 · 10513 阅读 · 0 评论 -
oracle与mysql对同一张表 两列数据的某一字段进行值的交换
mysql的:UPDATE ops_menu AS per JOIN ops_menu AS next ON (per.menu_id = 1 AND next.menu_id = 11) OR (per.menu_id =11 AND next.menu_id = 1) SET per.order_num = next.order_num, next.order_num = per.o...原创 2019-07-03 17:32:36 · 737 阅读 · 0 评论