摘要: 第一步、创建用户。使用有管理员权限的用户创建一个新的用户:create user 用户名 identified by 密码 default tablespace 表空间; 第二步、赋连接权限:grant connect to 用户名; 第三步、赋表权限grant select on owner.表名 阅读全文
posted @ 2018-10-29 13:59 忧郁香蕉 阅读(4319) 评论(0) 推荐(0) 编辑
摘要: //实现图片预览 function change_photo(){ PreviewImage($("input[name='picture']")[0], 'img', 'imgtd'); } function PreviewImage(fileObj,imgPreviewId,divPreviewId){ var allowExtention=".jpg,.bmp,.gi... 阅读全文
posted @ 2018-09-09 15:20 忧郁香蕉 阅读(1986) 评论(0) 推荐(0) 编辑
摘要: 1) 最简单的形式 SQL 代码 --经确认customers表中所有customer_id小于1000均为'北京' --1000以内的均是公司走向全国之前的本城市的老客户:) update customers set city_name='北京' where customer_id<1000 SQ 阅读全文
posted @ 2018-01-09 12:15 忧郁香蕉 阅读(879) 评论(0) 推荐(0) 编辑
摘要: --使用闪回查询获取丢失的行 select * from sys_user as of timestamp to_timestamp('2017-11-22 17:55:00', 'yyyy-mm-dd hh24:mi:ss') where name = 'lee'; --使用闪回查询还原丢失的行 阅读全文
posted @ 2017-12-19 17:00 忧郁香蕉 阅读(7242) 评论(0) 推荐(0) 编辑
摘要: //查询某年1-12月的数据 select to_char(createdate,'yyyy-mm') 月份,count(*) 数量 from cms_news where ispub='1' and createdate between to_date('2014-01','yyyy-mm') a 阅读全文
posted @ 2017-12-07 11:22 忧郁香蕉 阅读(3803) 评论(0) 推荐(0) 编辑
摘要: create or replace FUNCTION FN_GETPY(p_str IN VARCHAR2, p_flag NUMBER DEFAULT NULL) RETURN VARCHAR2 AS v_compare VARCHAR2(4); v_return VARCHAR2(4000); v_l... 阅读全文
posted @ 2017-10-24 21:42 忧郁香蕉 阅读(5107) 评论(1) 推荐(0) 编辑
摘要: 查单个字段: 查组合字段: 阅读全文
posted @ 2017-10-24 20:08 忧郁香蕉 阅读(231) 评论(0) 推荐(0) 编辑
摘要: form数据的序列化: jQuery的ajax方法: 原生的ajax方法: 阅读全文
posted @ 2017-10-20 10:27 忧郁香蕉 阅读(194) 评论(0) 推荐(0) 编辑
摘要: TO_DATE格式(以时间:2007-11-02 13:45:25为例) Year: Month: Day: Hour: Minute: Second: 其它 24小时格式下时间范围为: 0:00:00 - 23:59:59.... 12小时格式下时间范围为: 1:00:00 - 12:59:59. 阅读全文
posted @ 2017-08-09 14:48 忧郁香蕉 阅读(270) 评论(0) 推荐(0) 编辑
摘要: 两种方法: -- 方法1. UPDATE 表2 SET 表2.C = (SELECT B FROM 表1 WHERE 表1.A = 表2.A) WHERE EXISTS ( SELECT 1 FROM 表1 WHERE 表1.A = 表2.A) -- 方法2 MERGE INTO 表2 USING  阅读全文
posted @ 2017-06-04 15:16 忧郁香蕉 阅读(6779) 评论(0) 推荐(0) 编辑