首页 > 数据库 > Oracle > 正文

ORACLE问题,每天10问(十二)

2020-03-09 22:54:39
字体:
来源:转载
供稿:网友



111. 返回大于等于n的最小整数值?  select ceil(n) from dual;  112. 返回小于等于n的最小整数值?  select floor(n) from dual;  113. 返回当前月的最后一天?  select last_day(sysdate) from dual;  114. 如何不同用户间数据导入?  imp system/manager file=aa.dmp fromuser=user_old touser=user_new rows=y indexes=y ;

       115. 如何找数据库表的主键字段的名称?  sql>select * from user_constraints where constraint_type='p' and table_name='table_name';  116. 两个结果集互加的函数?  sql>select * from bsempms_old intersect select * from bsempms_new;  sql>select * from bsempms_old union select * from bsempms_new;  sql>select * from bsempms_old union all select * from bsempms_new;  117. 两个结果集互减的函数?  sql>select * from bsempms_old minus select * from bsempms_new;  118. 如何配置sequence?  建sequence seq_custid   create sequence seq_custid start 1 incrememt by 1;   建表时: create table cust { cust_id smallint not null, ...} insert 时: insert into table cust values( seq_cust.nextval, ...)   119>.日期的各部分的常用的的写法  取时间点的年份的写法:select to_char(sysdate,'yyyy') from dual;  120>.取时间点的月份的写法:select to_char(sysdate,'mm') from dual;
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表