Cloning Nodes 节点克隆
Another way of updating page contents using DOM methods is to clone existing DOM elements instead of creating new ones—in other words, using element.cloneNode() (where element is an existing node) instead of document.createElement().
使用DOM方法更新页面内容的另一个途径是克隆已有DOM元素,而不是创建新的——即使用element.cloneNode()(element是一个已存在的节点)代替document.createElement();
Cloning nodes is more efficient in most browsers, but not by a big margin. Regenerating the table from the previous example by creating the repeating elements only once and then copying them results in slightly faster execution times:
在大多数浏览器上,克隆节点更有效率,但提高不太多。用克隆节点的办法重新生成前面例子中的表,单元只创建一次,然后重复执行复制操作,这样做只是稍微快了一点:
• 2% in IE8, but no change in IE6 and IE7
在IE8中快2%,但在IE6和IE7中无变化
• ......
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>five-in-a-raw</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<style>
<!--
table{text-align: center;font-size: 20px;cursor: hand;empty-cells: show;table-layout: fixed;}
-->
</style>
</head>
<script type="text/javascript">
<!--
function FiveRawGame(){
this.redChess="<font color=\"red\">X</font>";
this.blackChess="<font color='black'>O</font>";
//初始化棋盘和数据
this.init=function(){
var str="<table width=\"600\" height=\"600;\" border=\"1\" cellpadding=\"0\" cellspacing=\"0\" >";
for(var i=0;i<25;i++){
str+="<tr heig ......
INSERT INTO hydlsrs@remote_zzh
SELECT * from hydlsrs where zzh='2'
hydlsrs为表名 @remote_zzh为库名
select * from hydlsrs为另1库中表名,
不同库中相同表结构,可以跨库插入。用于
2地倒入表内容。 ......
1. 复制表结构及其数据:
create table table_name_new as select * from table_name_old
2. 只复制表结构:
create table table_name_new as select * from table_name_old where
1=2;
或者:
create table table_name_new like table_name_old
3. 只复制表数据:
如果两个表结构一样:
insert into table_name_new select * from table_name_old
如果两个表结构不一样:
insert into
table_name_new(column1,column2...) select column1,column2...
from table_name_old ......
一些基本的Oracle命令
基本命令
连接数据库
C:>SQLPLUS /NOLOG
SQL>CONN / AS SYSDBA
1.Oracle 关闭
SQL>SHUTDOWN (ABORT|IMMEDIATE|NORMAL)
2.Oracle 启动
SQL>STARTUP (REMOUNT|MOUNT|OPENT)
3.SQL> HELP SHOW
SHOW
----
Shows the value of a SQL*Plus system variable, or the
current SQL*Plus environment.
SHO[W] option
where option represents one of the following terms or clauses:
system_variable
ALL
BTI[TLE]
ERR[ORS] [{FUNCTION | PROCEDURE | PACKAGE | PACKAGE BODY | TRIGGER
| VIEW | TYPE | TYPE BODY | DIMENSION | JAVA CLASS} [schema.]name]
LNO
PARAMETERS [parameter_name]
PNO
REL[EASE]
REPF[OOTER]
REPH[EADER]
SGA
& ......
1. 查询数据库现在的表空间
select tablespace_name, file_name, sum(bytes)/1024/1024 table_size from dba_data_files group by tablespace_name,file_name;
2. 建立表空间
CREATE TABLESPACE data01 DATAFILE '/oracle/oradata/db/DATA01.dbf' SIZE 500M;
3.删除表空间
DROP TABLESPACE data01 INCLUDING CONTENTS AND DATAFILES;
4. 修改表空间大小
alter database datafile '/path/NADDate05.dbf' resize 100M
5.增加数据文件
ALTER TABLESPACE NEWCCS ADD DATAFILE '/u03/oradata/newccs/newccs04.dbf' SIZE 4896M;
6. 删除数据文件
sql>alter database datafile '/path/NADDate05.dbf' OFFLINE DROP;
本文来自CSDN博客:http://blog.csdn.net/tianlesoftware/archive/2009/10/17/4681973.aspx ......