Oracle创建索引,修改索引,使用同义词

---------------------------------阶段2------------------------------------------------------------------------
Connected to Oracle Database 10g Enterprise Edition Release 10.2.0.1.0
Connected as scott

SQL> create sequence seq_test
2 increment by 1
3 start with 1
4 maxvalue 10000;

Sequence created
----------------------------------练习2------------------------------------------------------------------------
SQL> alter sequence seq_test increment by 250;

Sequence altered

SQL> select seq_test.nextval from dual;

----------------------------------使用同义词------------------------------------------------------------------------

SQL> grant connect to tudou;

Grant succeeded

SQL> grant resource to tudou;

Grant succeeded

SQL> grant create synonym to tudou;

Grant succeeded

SQL> conn tudou;
Connected to Oracle Database 10g Enterprise Edition Release 10.2.0.1.0
Connected as tudou

SQL> create table temp1 (
2 name varchar2(19),
3 age varchar2(3)
4 );

Table created

SQL> insert into temp1 values ('土土','22');

1 row inserted

SQL> select * from temp1;

NAME AGE
------------------- ---
土土 22

SQL> create or replace synonym syn_temp1 for temp1;

Synonym created

SQL> select * from syn_temp1;

NAME AGE
------------------- ---
土土 22


你可能感兴趣的:(Oracle创建索引,修改索引,使用同义词)