ORACLE SQL优化 ORACLE执行计划
Last login: Mon Feb 8 14:13:19 2010 from 192.168.1.249
ipnet
-bash-3.00$
-bash-3.00$ ipnet
-bash: ipnet: command not found
-bash-3.00$ su - oracle
Password:
eastcsu: incorrect password
-bash-3.00$ eastcom
-bash: eastcom: command not found
-bash-3.00$ su - oracle
Password:
[oracle@ipnet-td2 ~]$
[oracle@ipnet-td2 ~]$ sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Feb 8 14:14:08 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> su^H^H^H
SP2-0042: unknown command " - rest of line ignored.
SQL> conn ipnet/ipnet1234@ORAC^H^H^H
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
SQL> ^[[A^H " - rest of line ignored.
SQL> 042: unknown command "
SQL> conn ipnet/ipnet1234@ORCL
Connected.
SQL> set timn^H
SP2-0158: unknown SET option "tim"
SQL> set timing on
SQL> set autot traceonly
SQL> select v.NAME_CN from vendor v, vendordevicetype vt, devicetype t where t.name = vt.device_type_name and v.name = vt.vendor_name and t.name_cn = '防火墙';
Elapsed: 00:00:00.01
Execution Plan
----------------------------------------------------------
Plan hash value: 497066359
--------------------------------------------------------------------------------
------------------
| Id | Operation | Name | Rows | Bytes | Cost
(%CPU)| Time |
--------------------------------------------------------------------------------
------------------
| 0 | SELECT STATEMENT | | &n
相关文档:
C:\>sqlplus /nolog
SQL*Plus: Release 9.2.0.1.0 - Production on 星期三 1月 19 14:46:21 2005
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL> connect chanet/chanet@oradb;
已连接。
SQL> CREATE TABLE IMAGE_LOB (T_ID VARCHAR2 (5) NOT NULL,T_IMAGE ......
在/etc/rc.d/init.d/ 创建oracle10g文件
touch oracle10g
chmod a+x oracle10g
[root@test~]# vi /etc/rc.d/init.d/oracle10g
#!/bin/bash
#chkconfig:345 51 49
#description:starts the oracle database deamons
#
ORACLE_HOME=/oracle/product/10.2.0/db_1
ORACLE_OWNER=oracle
case "$1" in
start)
echo ......
SQL Server 得到行号的SQL
使用临时表:
select id=identity(int,1,1),value into #temp from YourTable
select * from #temp
drop table #temp
取得第11到20行记录:
select IDENTITY(in ......
下列语句部分是Mssql语句,不可以在access中使用。
SQL分类:
DDL—数据定义语言(CREATE,ALTER,DROP,DECLARE)
DML—数据操纵语言(SELECT,DELETE,UPDATE,INSERT)
DCL—数据控制语言(GRANT,REVOKE,COMMIT,ROLLBACK)
首先,简要介绍基础语句:
1、说明:创建数据库
CREATE DATABASE database-nam ......
有时在做程序时,测试时的数据,要拿像用户演示,数据库的附加是最直接的办法,但若从SQL Server 2005转向2000导出麻烦,内容也多,生成SQL语句是最好的办法,也是在网上找的工具,mssql2导出非常方便,担心我以后难得找所以放在这里,以备后用。 ......