linux 下orcale基本操作指令

------------------------------------------------------------------------------------------------------------------------------------------------------------

第一步登录数据服务器:

输入账号

ssh 192.168.111.111  -l oracle

输入密码   *********

------------------------------------------------------------------------------------------------------------------------------------------------------------

第二步 登录数据

输入数据库账号   sqlplus user

输入 数据库密码   **********

进行数据库操作

------------------------------------------------------------------------------------------------------------------------------------------------------------

1.查询 

输入   select id from table;  

回车键;

------------------------------------------------------------------------------------------------------------------------------------------------------------

2.插入

输入  insert into ecp_sys_type (ID, SYS_ID, SYS_NAME, DESCRIPTION) values (162, 'iphone', 'iPhone', 'iphone');

回车键;

输入 :commit;

------------------------------------------------------------------------------------------------------------------------------------------------------------

3.修改

输入:update ecp_wap_channel set id=424 where channel_id='ZZ0761';

回车键;

输入:commit;

------------------------------------------------------------------------------------------------------------------------------------------------------------

4.查询序列当前值  select SEQ_ECP_SYS_SUPPLY.nextval from dual;

------------------------------------------------------------------------------------------------------------------------------------------------------------

5.创建表

输入:

create table ECP_SYS_TYPE
(
  ID          NUMBER not null,
  SYS_ID      VARCHAR2(32),
  SYS_NAME    VARCHAR2(64),
  DESCRIPTION VARCHAR2(500)
);

回车键;

输入 :commit;

------------------------------------------------------------------------------------------------------------------------------------------------------------

6.创建序列

输入:

create sequence SEQ_ECP_WAP_LOG
minvalue 1
maxvalue 9999999999999999999999999999
start with 600
increment by 1
cache 20;

回车键:

输入:commit;

------------------------------------------------------------------------------------------------------------------------------------------------------------

注意:有更新动作时候;一定要记得commit。

你可能感兴趣的:(linux 下orcale基本操作指令)