成都创新互联网站制作重庆分公司

oracle中怎么输入,oracle在哪里输入命令

oracle如何从键盘输入数据

1.首先装好10g 11g的数据库;

成都创新互联公司于2013年成立,先为邵原等服务建站,邵原等地企业,进行企业商务咨询服务。为邵原企业网站制作PC+手机+微官网三网同步一站式服务解决您的所有建站问题。

2.登陆数据库并创建用户;

开始--运行--sqlplus /nolog

conn /as sysdba

create user test identified by test;

grant resource,connect to test;

3.使用test(密码 test)用户账号登陆,并建立一张简单的表

create table test (id int,name char(10));

4.向该表插入数据

insert into test values (1,'yxd2766');

commit;

如何在Oracle的表编辑器中直接输入日期型数据

往Oracle数据库中插入日期型数据(to_date的用法)

INSERT INTO FLOOR VALUES ( to_date ( '2007-12-20 18:31:34' , 'YYYY-MM-DD HH24:MI:SS' ) ) ;

查询显示:2007-12-20 18:31:34.0

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

INSERT INTO FLOOR VALUES ( to_date ( '2007-12-14 14:10' , 'YYYY-MM-DD HH24:MI' ) );

查询显示:2007-12-14 14:10:00.0

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

INSERT INTO FLOOR VALUES ( to_date ( '2007-12-14 14' , 'YYYY-MM-DD HH24' ) );

查询显示:2007-12-14 14:00:00.0

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

INSERT INTO FLOOR VALUES ( to_date ( '2007-11-15' , 'YYYY-MM-DD' ) );

查询显示:2007-11-15 00:00:00.0

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

INSERT INTO FLOOR VALUES ( to_date ( '2007-09' , 'YYYY-MM' ) );

查询显示:2007-09-01 00:00:00.0

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

INSERT INTO FLOOR VALUES ( to_date ( '2007' , 'YYYY' ) );

查询显示:2007-05-01 00:00:00.0

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

oracle中怎样导入数据库文件

可用图形界面或者命令导入:

图形界面需要借助第三方工具plsql,方法如下:

1、登录到要导入的数据库及用户。

2、依次点击“工具”——“导入表”。

3、上方选择“oracle导入”,下方找到.dmp的文件,然后点击“导入”等待完成即可。

命令导入:

1、win键+R键,进入命令提示符。

2、进到.dmp文件所在文件夹:

3、输入如下命令:

imp 被导入用户名/密码@实例名 file=文件名.dmp log=日志.dmp fromuser=导出用户 touser=导入用户

输入后按回车键,等待导入完成即可。

说明:第三点中中文部分,请根据实际情况填写。

在Oracle里,输入参数怎么写?

你也没给出个表名,临时给你写个例子,自己运行看看结果吧

建表

create table orders(oid varchar2(10),

price int);插入数据

insert into orders values ('1111',100);

insert into orders values ('1111',200);

insert into orders values ('2222',400);建立存储过程

create or replace procedure p_orders

(v_oid varchar2)

as

v_count int;

v_pirce int;

begin

select count(*) into v_count from orders where oid=v_oid;

if v_count=0

then

dbms_output.put_line('订单编号不存在');

else

select sum(price) into v_pirce from orders where oid=v_oid;

dbms_output.put_line('编号为'||v_oid||'的订单金额为'||v_pirce);

end if;

end;

执行1

begin

p_orders('3333');--括号里这个就是订单编号

end;这个执行结果是

执行2

begin

p_orders('1111');--括号里这个就是订单编号

end;

然后你自己再改改吧

oracle怎样导入数据库

我给你一些数据库常用的导入导出命令吧:\x0d\x0a该命令在“开始菜单运行CMD”中执行\x0d\x0a一、数据导出(exp.exe)\x0d\x0a1、将数据库orcl完全导出,用户名system,密码accp,导出到d:\daochu.dmp文件中\x0d\x0aexp system/accp@orcl file=d:\daochu.dmp full=y\x0d\x0a\x0d\x0a2、将数据库orcl中scott用户的对象导出\x0d\x0aexp scott/accp@orcl file=d:\daochu.dmp owner=(scott)\x0d\x0a\x0d\x0a3、将数据库orcl中的scott用户的表emp、dept导出\x0d\x0aexp scott/accp@orcl file= d:\daochu.dmp tables=(emp,dept)\x0d\x0a\x0d\x0a4、将数据库orcl中的表空间testSpace导出\x0d\x0aexp system/accp@orcl file=d:\daochu.dmp tablespaces=(testSpace)\x0d\x0a\x0d\x0a二、数据导入(imp.exe)\x0d\x0a1、将d:\daochu.dmp 中的数据导入 orcl数据库中。\x0d\x0aimp system/accp@orcl file=d:\daochu.dmp full=y\x0d\x0a\x0d\x0a2、如果导入时,数据表已经存在,将报错,对该表不会进行导入;加上ignore=y即可,表示忽略现有表,在现有表上追加记录。\x0d\x0aimp scott/accp@orcl file=d:\daochu.dmp full=y ignore=y\x0d\x0a\x0d\x0a3、将d:\daochu.dmp中的表emp导入\x0d\x0aimp scott/accp@orcl file=d:\daochu.dmp tables=(emp)

oracle如何实现在存储过程中键盘输入数据

可用DBMS_OUTPUT.PUT_LINE()对存储过程的内容进行输出。如:一个简单的存储过程如下 declare cursor c_job is select empno,ename,job,sal from emp where job='MANAGER'; c_row c_job%rowtype;begin for c_row in c_job loop dbms_output.put_line(c_row.empno||'-'||c_row.ename||'-'||c_row.job||'-'||c_row.sal); end loop;end; 结果中,红色部分就是存储过程的输出。


当前名称:oracle中怎么输入,oracle在哪里输入命令
链接URL:http://cxhlcq.com/article/dsgsgoe.html

其他资讯

在线咨询

微信咨询

电话咨询

028-86922220(工作日)

18980820575(7×24)

提交需求

返回顶部