上一页 1 ··· 3 4 5 6 7 8 9 10 11 下一页
摘要: SELECT c.*FROM ( SELECT IFNULL(b.客户,"总计") AS 客户, SUM(IF(b.`日期`='01',b.数量,NULL)) AS '01', SUM(IF(b.`日期`='02',b.数量,NULL)) AS '02', SUM(IF(b.`日期`='03',b. 阅读全文
posted @ 2018-07-21 09:06 zhuangrunwei 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 1、下载 (1)安装jdk 如果进行web开发,下载java se 版本的jdk即可,不需要像安装 java se 一样安装java ee(里面大多是接口和抽象类)。关于java ee的依赖问题有两种解决方案:一,在pom文件中添加java ee的依赖;同时设置依赖范围,这样在使用maven的pac 阅读全文
posted @ 2018-07-19 09:44 zhuangrunwei 阅读(319) 评论(0) 推荐(0) 编辑
摘要: 1、到loracle 的安装目录,D:\ProgramFiles\oracle\product\11.2.0\dbhome_1\jdbc\lib,找到文件 ojdbc6.jar,复制到 D 盘。 2、执行如下命令: mvn install:install-file -Dfile=D:\ojdbc6. 阅读全文
posted @ 2018-07-16 23:23 zhuangrunwei 阅读(203) 评论(0) 推荐(0) 编辑
摘要: create table salary (userid int,salary decimal(9,2)); -- mysqlinsert into salary values(1,1000),(2,2000), (3,3000),(4,4000),(5,5000), (1,null),(2,500) 阅读全文
posted @ 2018-07-15 06:11 zhuangrunwei 阅读(230) 评论(0) 推荐(0) 编辑
摘要: select * from emp where hiredate > '1982-1-1'; -- mysqlselect * from emp where hiredate > to_date('1982-1-1', 'yyyy-mm-dd'); -- oracle 阅读全文
posted @ 2018-07-15 05:45 zhuangrunwei 阅读(7994) 评论(0) 推荐(0) 编辑
摘要: 本页面所有内容也可以在oracle 运行,只需要把int、float 、decimal 改为 number类型即可 -- 字符串转数字 int 类型 drop table test;create table test(id int);insert into test values(100);inse 阅读全文
posted @ 2018-07-15 05:33 zhuangrunwei 阅读(5312) 评论(0) 推荐(0) 编辑
摘要: 解决方案: startup.bat,右击->编辑,在文件头加入下面两行: SET JAVA_HOME=D:\Java\jdk1.7 (java jdk目录) SET TOMCAT_HOME=E:\tomcat-7.0 (解压后的tomcat文件目录) shutdown.bat, 右击->编辑,在文件 阅读全文
posted @ 2018-07-09 18:33 zhuangrunwei 阅读(248) 评论(0) 推荐(0) 编辑
摘要: 设置保存点savepoint test;取消部分事务rollback to test;取消全部事务rollback; insert into emp(empno, job) values(1, '测试');insert into emp(empno, job) values(2, '测试2');in 阅读全文
posted @ 2018-07-09 05:30 zhuangrunwei 阅读(151) 评论(0) 推荐(0) 编辑
摘要: -- oracle分页: select e.*, rownum rn from (select * from emp) e; select e.*, rownum rn from (select * from emp) e where rn < 5; -- 这个不对 select e.*, rown 阅读全文
posted @ 2018-07-09 04:46 zhuangrunwei 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 导常:org.springframework.web.context.ContextLoaderListener 1. 右键单击工程项目 ->点击 properties2. 选择 Deployment Assembly3. 点击 Add -> Java Build Path Entries -> N 阅读全文
posted @ 2018-07-08 20:45 zhuangrunwei 阅读(276) 评论(0) 推荐(0) 编辑
摘要: -- 日期函数:select sysdate from dual;insert into emp(empno, hiredate) values(77, to_date('1999-9-9', 'yyyy-mm-dd'));-- 入职时间大于400个月的员工select * from emp whe 阅读全文
posted @ 2018-07-08 01:06 zhuangrunwei 阅读(125) 评论(0) 推荐(0) 编辑
摘要: -- 字符函数:-- 查询结果姓名小写 select lower(ename), sal, job from emp;-- 查询结果姓名大写 select upper(ename), sal, job from emp;-- 名字5个字符 select ename, sal, job from em 阅读全文
posted @ 2018-07-08 00:55 zhuangrunwei 阅读(237) 评论(0) 推荐(0) 编辑
摘要: -- 内连接:-- 显示员工姓名、工资和公司所在地 select e.ename, e.sal, d.dname from emp e,dept d; -- 笛卡尔积 select e.ename, e.sal, d.dname from emp e join dept d; -- oracle语法 阅读全文
posted @ 2018-07-07 23:52 zhuangrunwei 阅读(1302) 评论(0) 推荐(0) 编辑
摘要: -- 工资高于3000的员工select * from emp where sal > 3000;-- 工资在2500和3000之间的员工select * from emp where sal <= 3000 and sal >= 2500;-- 指定日期后入职的员工select * from em 阅读全文
posted @ 2018-07-07 22:22 zhuangrunwei 阅读(503) 评论(0) 推荐(0) 编辑
摘要: -- 创建表 drop table test; create table test(id number(10), name varchar2(10)); -- 创建对列 drop sequence seq_id; create sequence seq_id minvalue 1 nomaxvalu 阅读全文
posted @ 2018-07-07 20:30 zhuangrunwei 阅读(215) 评论(0) 推荐(0) 编辑
摘要: conn scott/root;create table student (id number(3), name varchar2(10), sex char(2), sno number(3));alter table student add(sal number(7,2), birthday d 阅读全文
posted @ 2018-07-07 19:55 zhuangrunwei 阅读(182) 评论(0) 推荐(0) 编辑
摘要: char 固定长度,最长2000,会使用空格将值填充到指定的长度。优点,查询快。 varchar2 1、最大长度4000字节或4000字符2、变长,末尾不添加无意义的空格3、如果试图在 varchar2 字段中插入超过其规定范围的字符,出错示例:insert into emp(empno, enam 阅读全文
posted @ 2018-07-07 19:40 zhuangrunwei 阅读(236) 评论(0) 推荐(0) 编辑
摘要: 1、命令行参数 比如:exp scott/tiger@orcl tables=emp file=D:\test.dmp 2、交互提示符 比如:C:\Users\Administrator>exp + 回车 输入用户名,回车 输入密码,回车 回车 输入导出的路径 回车 回车... 3、参数文件 新建一 阅读全文
posted @ 2018-07-07 19:34 zhuangrunwei 阅读(571) 评论(0) 推荐(0) 编辑
摘要: imp help=y导入自己的表:exp scott/tiger@orcl tables=(student, address) file=D:\scott_stu_add.dmp log=D:\scott_stu_add.logimp scott/tiger@orcl file=D:\scott_s 阅读全文
posted @ 2018-07-07 19:01 zhuangrunwei 阅读(190) 评论(0) 推荐(0) 编辑
摘要: exp help=yconn scott/tiger;select * from tab;create table student(sno int, sname varchar2(10), sage int, constraint pk_sno primary key(sno));insert in 阅读全文
posted @ 2018-07-07 18:26 zhuangrunwei 阅读(454) 评论(0) 推荐(0) 编辑
摘要: conn sys as sysdba;create role testrole;grant create session, create table, unlimited tablespace to testrole;create user test identified by test;grant 阅读全文
posted @ 2018-07-06 23:11 zhuangrunwei 阅读(271) 评论(0) 推荐(0) 编辑
摘要: drop user test cascade;create user test identified by test;grant create session to test;grant create any table to test;conn test/test;create table sco 阅读全文
posted @ 2018-07-06 22:36 zhuangrunwei 阅读(690) 评论(0) 推荐(0) 编辑
摘要: 单列去重: mysql: drop table test;create table test(id int(4));insert into test values(1),(2),(3),(4),(1),(2);select count(distinct id) from test;oracle:dr 阅读全文
posted @ 2018-07-06 20:51 zhuangrunwei 阅读(4399) 评论(0) 推荐(0) 编辑
摘要: conn sys as sysdba; create user test identified by test; grant create session to test; grant create table to test; 这个时候还没有使用表空间的权限,还不可以建表grant unlimit 阅读全文
posted @ 2018-07-06 20:49 zhuangrunwei 阅读(385) 评论(0) 推荐(0) 编辑
摘要: 创建用户: create user test identified by test; 修改密码: 1、alter user test identified by mima; 2、passw[ord] [用户名],然后再输入新密码,旧密码 删除用户: drop user test cascade; / 阅读全文
posted @ 2018-07-06 20:14 zhuangrunwei 阅读(440) 评论(0) 推荐(0) 编辑
摘要: 创建用户的时候指定表空间:create user username identified by userpassword default tablespace userspace; 重新定义默认表空间的:alter user username default tablespace userspace 阅读全文
posted @ 2018-07-06 20:04 zhuangrunwei 阅读(106) 评论(0) 推荐(0) 编辑
摘要: Profile文件概述: Profile是Oracle安全策略的一个组成部分,当Oracle建立数据库时,会自动建立名称为Default的Profile文件。 创建用户的时候,如果没有指定profile,那么Oracle会把default profile赋予给用户。 使用oracle 企业管理器查看 阅读全文
posted @ 2018-07-06 19:44 zhuangrunwei 阅读(438) 评论(0) 推荐(0) 编辑
摘要: 使用工具Database Configuration Assistant) 阅读全文
posted @ 2018-07-06 19:26 zhuangrunwei 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 1、connect 或conn,还有 disc[onnect] 断开连接 2、修改密码命令 passw[ord] [用户名],然后再输入新密码,旧密码3、show user4、clear screen 5、set linesize 120; set pagesize 20; 参数20表示每一页大小的 阅读全文
posted @ 2018-07-06 18:50 zhuangrunwei 阅读(573) 评论(0) 推荐(0) 编辑
摘要: 1、数据定义语言 DDL 有 create alter drop2、数据操纵语言 DML insert select delete update3、事务控制语言 TCL commit savepoint rollback4、数据控制语言 DCL grant revoke 阅读全文
posted @ 2018-07-06 18:30 zhuangrunwei 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 注意: oracle em 的访问地址在 D:\oracle\product\11.2.0\dbhome_1\install 下的文件里。 如果在windows 安装oracle,并且在本地访问,oracle em 的访问地址可以是下面这些: (1)、https://PC-20180705MOOP: 阅读全文
posted @ 2018-07-06 16:44 zhuangrunwei 阅读(319) 评论(0) 推荐(0) 编辑
摘要: oracle网络配置有三个文件,它们都在D:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN 这个文件夹下面,有sqlnet.ora、listener.ora、tnsnames.ora。 sqlnet.ora里只有两行配置: 1、SQL 阅读全文
posted @ 2018-07-06 15:42 zhuangrunwei 阅读(932) 评论(0) 推荐(0) 编辑
摘要: easyui-datagrid:loadFilter:处理服务器端传递过来的参数。 刷新datagrid:$("#xxx").datagrid('reload'): form 表单提交前处理参数: $('#coopinfoform').form( onSubmit: function(param){ 阅读全文
posted @ 2018-07-06 15:00 zhuangrunwei 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 1、删除表结构和表数据 drop table 表名 [purge] purge表示不放入回收站 2、删除表数据 delete from 表名 [where ...] 特点:高水位线不降;记录日志,速度慢,可以恢复(savepoint test; rollback to test;) 3、删除表数据 阅读全文
posted @ 2018-07-05 22:55 zhuangrunwei 阅读(7615) 评论(0) 推荐(0) 编辑
摘要: 打开已用时间set timing on;create table users(id number(20), name varchar2(20), password varchar2(20));insert into users values(111111111111111, '爱新觉罗·启星', ' 阅读全文
posted @ 2018-07-05 21:37 zhuangrunwei 阅读(1098) 评论(0) 推荐(0) 编辑
摘要: 1、mysql 有枚举类型,oracle 没有; mysql不支持number、varchar2类型,报错。2、oracle 支持全外连接,mysql 不支持 select e.ename, e.sal, d.dname from emp e full join dept d on e.deptno 阅读全文
posted @ 2018-07-04 22:19 zhuangrunwei 阅读(263) 评论(0) 推荐(0) 编辑
摘要: 1.开始菜单-运行-输入“regedit”。 2.找到这个位置“[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer]”。 3.在右边的窗口单击右键,新建一个“DWORD(32-位)值”。 4.把新建的这个值的名字 阅读全文
posted @ 2018-05-09 19:56 zhuangrunwei 阅读(525) 评论(0) 推荐(0) 编辑
摘要: 在Spring security的使用中,为了对方法进行权限控制,通常采用的三个注解,就是@Secured()、@PreAuthorize()、@RolesAllowed()。 示例,修改用户密码必须是ADMIN权限,可以用三种方法: @Secured({"ROLE_ADMIN"}) public 阅读全文
posted @ 2018-03-17 21:04 zhuangrunwei 阅读(861) 评论(0) 推荐(0) 编辑
摘要: Lombok注解有@Date、@ AllArgsConstructor 在spring boot 中,我们可以使用@Data标签,这样就不需要手动添加getter/setter方法了,但Idea会报错。 此时,我们需要安装Lombok插件,安装好插件后便可以解决这个问题。 截图如下: 阅读全文
posted @ 2018-03-17 20:40 zhuangrunwei 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 1. 管理员权限运行命令提示符,登陆MySQL mysql -u root -p root 2. 修改账户密码加密规则并更新用户密码 ALTER USER 'root'@'localhost' IDENTIFIED BY 'root' PASSWORD EXPIRE NEVER; #修改加密规则 A 阅读全文
posted @ 2018-03-16 14:16 zhuangrunwei 阅读(462) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 下一页