-- 取倒数第二位 select to_number(substr('12345', -2, 1)) from dual; -- 正规匹配尾数为2,7的字符串 select example_str from example_table where regexp_like(example_str, '.*[27]$'); -- 取日期(年-月-日)中的日 select to_number(to_char(sysdate, 'dd')) from dual; -- 使用已有字段创建表,其中select子句可加where条件 create table t2 as select * from t1; -- 向目标表中插入已知表数据,t2须存在且目标列与数据源类型要相同 insert into t2 select * from t1; -- table rename alter table mytable rename to othertable -- In Oracle 10g also: rename mytable to othertable