安装完12C以后他的用户名会锁定吗,所以要解除锁定,
1.使用sysdba账号 登陆后 可以修改其他账号密码
运行 cmd 按如下输入命令 sqlplus / as sysdba ---------以sys登陆 超级用户(sysdba)
2.解除锁定账号
alter user 用户名 account unlock;
3.为该账户设置新密码
alter user 用户名 identified by 密码;
vs
引用 system.data.oracleclient;
连接字符串
User Id=system;Password=自己设置的密码;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=容器名)))
Oracle数据库表中自增字段
首先创建索引
1.创建一个索引sequence
create sequence student_ID_SEQ
minvalue 1
nomaxvalue
start with 1
increment by 1
nocache;
2.创建触发器
create or replace trigger students_trigger
before insert on students
for each row
declare
begin
select students_id_seq.nextval into:NEW.id from dual;
end students_trigger;