`
wengsibo
  • 浏览: 83145 次
  • 性别: Icon_minigender_1
  • 来自: 福建
社区版块
存档分类
最新评论
文章列表
package com.softfz.Test; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.SQLException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; i ...
一、(由于数据文件被删) 数据库启动不了! 即登录不了数据库;如下图 解决方法: 1) cmd 2) sqlplus “sys/oracle as sysdba”   --即以sysdba身份登录 3) shutdown; 4) startup;   将出现如图错误: 显示哪个文件被误删; 复制被删的文件: 如 C:\AAA.DBF   5) alter database datafile ‘C:\AAA.DBF’offline drop;  --即屏蔽此文件 6) alter database open;  --打开数据    如果正常打开则ok, 否则重复 将弹出如4)中的图 ...
select count(*) from g_cardapplydaliey a group by a.g_id having count(*)>=2
//建表空间 create tablespace TS_UPCFJ_USER datafile 'f:/oracle/tablespace/TS_UPCFJ_USER.dbf' size 200M autoextend on next 100M maxsize UNLIMITED extent management local autoallocate segment space management auto ; //删除用户 drop user civilinterview ca ...
select username,count(username) from v$session t where username is not null group by username;
select a.* from (select SCORE_ID,EX_EB_ID,EB_NAME,ss.ADMISSION_TICKET,SCOPE,EXAM_TIME,UPDATE_TIME, ei.examinee_id,ei.examinee_name, ei.register_dept,ei.dept_code,ei.register_station, ei.station_code, row_number() OVER(partition by dept_code, ei.station_code ORDER ...
分页中使用,查询表中第2行到第5行的数据 select * from( select id,name,rownum as myrow from tuse where rownum<6) where myrow>1;
使用SQL查看表的主键: select column_name from user_cons_columns wherE CONSTRAINT_NAME in (select CONSTRAINT_NAME from user_constraints where table_name ='TABLE_NAME' and CONSTRAINT_TYPE='P');
首先建表,序列 drop table student; drop table st_class; drop table st_score drop sequence SEQ_st_class; drop sequence SEQ_student; drop sequence seq_st_score; --创建学生表 create table student ( st_id NUMBER not null primary key, st_name VARCHAR2(50), ) --创建班级表 create table st_class ( ...
Oracle语句优化 http://coolvinson.iteye.com/blog/526437
insert into ti_examinee_group_link(GROUP_LINK_ID, EXAMINEE_ID, group_id) select seq_ti_examinee_group_link.nextval, t.examinee_id,1 from ti_examinee_info t left join ti_examinee_group_link b on t.examinee_id =b.examinee_id left join ti_exam_group c on ...
select i.sid,i.sname,i.birthday,i.schooltime,i.sphone,c.classname,a.assnname,sum(decode(subject,'语文',s.score,0)) as chin, sum(decode(subject,'数学',s.score,0)) as math, sum(decode(subject,'英语',s.score,0)) as eng from student_in ...
导入 imp prop/prop@orcl file=d:\servant.dmp fromuser=servant touser=prop prop/prop 登录的可户名 file:数据库文件名 fromuser:导出数据库时所使用的用户名 touser:要把这个数据库给本地的那个用户 导出 exp civilinterview/civilinterview@t.120 file=d:\civilinterview.dmp civilinterview:服务机上的用户 t.120:服务机上的sid
首先以sysdba身份登录 sqlplus connect system/orcl as sysdba; 然后修改参数 1.sga_target不能大于sga_max_size,可以设置为相等。 2.SGA加上PGA等其他进程占用的内存总数必须小于操作系统的物理内存。 alter system set sga_target=150M scope=spfile; alter system set sga_max_size=150M scope=spfile; //数据库已经关闭 shutdown immediate --重启一下实例服务 startup --查看设置后的参数 show ...
系统:XP,在CMD下输入下面命令 c:>sqlplus /nolog; SQL> conn /as sysdba 已连接。 SQL> alter user system identified by password;
Global site tag (gtag.js) - Google Analytics