如何修改模板网站,金华集团网站建设,前端开发需要哪些技术,品牌建设论文将现有的sql 脚本导入 Oracle数据库比如 在windows 系统下#xff0c;可以写一个 bat 来实现直接导入如#xff1a;bat 中的内容如下#xff0c;logs.log 将会记录执行日志sqlplus user/passworddbname create.sql logs.logcreate.sql 中的内容可以是需要执行的sql 语句…将现有的sql 脚本导入 Oracle数据库比如 在windows 系统下可以写一个 bat 来实现直接导入如bat 中的内容如下logs.log 将会记录执行日志sqlplus user/passworddbname create.sql logs.logcreate.sql 中的内容可以是需要执行的sql 语句也可以是其他sql 脚本如leave_create.sqlexitleave_create.sql 中的内容如下create table a_employee (id number(10) primary key ,name varchar2(255) not null,password varchar2(255) not null ,email varchar2(255) ,role varchar2(255) ,manager_id number(10));create sequence seq_employee minvalue 1 nomaxvalue start with 1 increment by 1 nocycle nocache;INSERT INTO a_employee(id,name,password,email,role,manager_id) VALUES (seq_employee.nextval,老板,123,ee163.com,boss,NULL);INSERT INTO a_employee(id,name,password,email,role,manager_id) VALUES (seq_employee.nextval,主任,123,cc163.com,manager,1);INSERT INTO a_employee(id,name,password,email,role,manager_id) VALUES (seq_employee.nextval,员工,123,aa163.com,user,3););commit;执行bat 文件理论上数据创建完成。打开日志文件发现文件中报错ERROR:ORA-01756: quoted string not properly terminated查询数据发现 中文显示乱码解决方法检查客户端的编码格式使用sqlplus 连接数据库 执行 Select userenv(language) from dual; 查询结果为AMERICAN_AMERICA.ZHS16GBK设置windows 环境变量NLS_LANGAMERICAN_AMERICA.ZHS16GBKTNS_ADMIND:\oracle\product\10.2.0\client_1\NETWORK\ADMIN (客户端的安装路径下)sql 脚本也有一定的编码格式(可以使用客户端连接工具保存的sql 文件 来保证sql 脚本文件的编码正确性)