CREAT TABLE用法
CREATE TABLE[@more@]To create a relational table in your own schema, you must have the CREATE TABLE system privilege. To create a table in another user's schema, you must have the CREATE ANY TABLE system privilege. Also, the owner of the schema to contain the table must have either space quota on the tablespace to contain the table or the UNLIMITED TABLESPACE system privilege.CREATE RELATIONAL TABLE:CREATE TABLE SCHEMA.TABLE_NAME (relational_properties) [physical_properties] [table_properties]co
TRUNC函数用法
TRUNC函数处理时间[@more@]1.设置一下时间的显示样式sec@secooler> alter session set NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS';Session altered.2.以系统时间为例,查看当前时间sys@secooler> select sysdate from dual;SYSDATE-------------------2010-03-31 00:22:483.不使用参数表示截取到日sys@secooler> select trunc(sysdate) trunc_default from dual;TRUNC_DEFAULT-------------------2010-03-31 00:00:004.截取到年以下八种方法都可以完成截取到年的功能。sys@secooler> select trunc(sysdate,'YEAR') trunc_year