上一页 1 ··· 55 56 57 58 59 60 61 62 63 ··· 205 下一页
摘要: SQL: select count(*) from emp4 where regexp_like(name,'^\d+$'); 关键函数: regexp_like(column_name,'^\d+$')测试语句: create table emp4( name varchar2(10) not n 阅读全文
posted @ 2021-10-28 21:04 逆火狂飙 阅读(122) 评论(0) 推荐(0)
摘要: 表定义完了后给字段加约束比较常见,毕竟变化是唯一不变的。 1.加主键 alter table table_name add primary key(id); 2.加唯一性约束 alter table table_name add unique(code); 3.给number类型字段status加输 阅读全文
posted @ 2021-10-27 21:16 逆火狂飙 阅读(211) 评论(1) 推荐(0)
摘要: SQL:select column_name,data_type from all_tab_columns where table_name=upper('table_name'); 执行: SQL> column column_name format a30; SQL> column data_t 阅读全文
posted @ 2021-10-26 06:26 逆火狂飙 阅读(1858) 评论(0) 推荐(0)
摘要: return new ModelAndView("redirect:[MappingPath]"); 或 return "redirect:[MappingPath]"; 比如页面是 aPage.html,则重定向为 return new ModelAndView("redirect:aPage") 阅读全文
posted @ 2021-10-24 15:44 逆火狂飙 阅读(2146) 评论(0) 推荐(0)
摘要: 用Html5/Canvas绘制蓝红白三色圆盘。 阅读全文
posted @ 2021-10-24 12:23 逆火狂飙 阅读(148) 评论(0) 推荐(0)
摘要: 后端代码: List<String> ls=starService.getAllFamousNames(); mav.addObject("famousNames", ls); 前端代码: <ol> <li th:each="name:${famousNames}"> <span th:text=" 阅读全文
posted @ 2021-10-23 20:54 逆火狂飙 阅读(497) 评论(0) 推荐(0)
摘要: 需求:某系统将诸多服务器状态定时存到在一张表里,查询时会给出一个时间,要求取出最接近于给定时间,又不可大于的一批记录。 比如,有gp、dws、etl三台服务器,8:00,9:00,10:00,11:00都有记录存储了它们的状态,当给定10:30时,就该取出10:00的那批记录。 存储数据的表结构如下 阅读全文
posted @ 2021-10-22 21:09 逆火狂飙 阅读(354) 评论(0) 推荐(0)
摘要: 取整语句: select trunc(12345.678,2), trunc(12345.678,1), trunc(12345.678,0), trunc(12345.678,-1), trunc(12345.678,-2) from dual 执行效果: SQL> select 2 trunc( 阅读全文
posted @ 2021-10-21 19:02 逆火狂飙 阅读(540) 评论(0) 推荐(0)
摘要: 拷贝文字后,在Sql plus创库->右键点标题栏->编辑->粘贴,就好了。 END 阅读全文
posted @ 2021-10-21 18:37 逆火狂飙 阅读(146) 评论(0) 推荐(0)
摘要: SQL: select to_char((sysdate-interval'1'day),'yyyy-mm-dd') as yesterday, to_char((sysdate-interval'1'month),'yyyy-mm-dd') as oneMonthAgo, to_char((sys 阅读全文
posted @ 2021-10-20 21:13 逆火狂飙 阅读(1131) 评论(0) 推荐(0)
上一页 1 ··· 55 56 57 58 59 60 61 62 63 ··· 205 下一页