Windows系统Java、mysql系统变量配置

Path:

C:\Program Files\PC Connectivity Solution\;C:\Program Files\Intel\iCLS Client\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\OpenCL SDK\2.0\bin\x86;%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;%MySQLHome%\bin

继续阅读“Windows系统Java、mysql系统变量配置”

ORCLE替换内容中的回车、换行、制表符(tab)

替换空格

UPDATE table t SET t.name=replace(t.name,’ ‘,”) ;

chr(13)表示回车(注意是chr,不是char)

UPDATE table t SET t.name=replace(t.name,chr(13),”) ;

chr(10)表示换行

UPDATE table t SET t.name=replace(t.name,chr(10),”) ;

chr(9)表示tab空格

UPDATE table t SET t.name=replace(t.name,chr(9),”) ;

ORACLE的replace函数会把字段中的所有字符替换掉,相当月reaplacAll

如果字段为大字段类型,需要先调用to_char函数进行处理

select replace(to_char(clob),chr(10),”) from table;

查询 long字段 clob

— 示例表

CREATE TABLE test(col1 long);

— 重建一个备份表,把其中的long字段改为clob

Create TABLE testBak (col1 clob);

插入数据

INSERT INTO testBak SELECT to_lob(col1) FROM test;

COMMIT;

查询

SELECT * FROM testBak WHERE col like ‘%download%’;

oracle查看表空间使用情况

SELECT a.tablespace_name 表空间名,

       total 表空间大小,

       free 表空间剩余大小,

       (total – free) 表空间使用大小,

       ROUND((total – free) / total, 4) * 100 使用率

  FROM (SELECT tablespace_name, ROUND(SUM(bytes) / (1024 * 1024), 4) free

          FROM DBA_FREE_SPACE

         GROUP BY tablespace_name) a,

       (SELECT tablespace_name, ROUND(SUM(bytes) / (1024 * 1024), 4) total

          FROM DBA_DATA_FILES

         GROUP BY tablespace_name) b

 WHERE a.tablespace_name = b.tablespace_name

oracle表解锁

SELECT /*+ rule */ s.username,

 decode(l.type,’TM’,’TABLE LOCK’,

 ‘TX’,’ROW LOCK’,

 NULL) LOCK_LEVEL,

 o.owner,o.object_name,o.object_type,

 s.sid,s.serial#,s.terminal,s.machine,s.program,s.osuser

 FROM v$session s,v$lock l,dba_objects o

 WHERE l.sid = s.sid

 AND l.id1 = o.object_id(+)

 AND s.username is NOT Null;

— alter system kill session’389,3523′;

腾讯云图