7、把SQL*Plus当计算器
SQL> select 100*20 from dual;
8、连接字符串
SQL> select 列1||列2 from 表1; SQL> select concat(列1,列2) from 表1;
9、查询当前日期
SQL> select to_char(sysdate,'yyyy-mm-dd,hh24:mi:ss') from dual;
10、用户间复制数据
SQL> copy from user1 to user2 create table2 using select * from table1;
11、视图中不能使用order by,但可用group by代替来达到排序目的
SQL> create view a as select b1,b2 from b group by b1,b2;
12、通过授权的方式来创建用户
SQL> grant connect,resource to test identified by test; SQL> conn test/test; |