Oracle Usage Summary

Source: Internet
Author: User

DROP TABLE * * * * purge;/to delete tables free space:
If you do not add purge then it is equivalent to just put it in the Recycle Bin.
Purge RecycleBin; /Empty Recycle Bin

Get current date (without time) select To_char (sysdate, ' yyyy-mm-dd ') as F_fulldate from DUAL


To view the primary key for a table:

Select cu.* from User_cons_columns cu, user_constraints au
where cu.constraint_name = au.constraint_name and Au.constraint_type = ' P ' and au.table_name = ' PRODDTA. F43121 '


Date and Julian calendar conversions:
--julian Convert to date
SELECT to_date (19+substr (Lpad (&b,6,0), 1, 1) | | SUBSTR (Lpad (&b,6,0), 2,5), ' yyyyddd ') DATE1 from DUAL

--julian Convert to date
SELECT SUBSTR (&b+1900000,5,3) -1+to_date (SUBSTR (&b+1900000,1,4) | | 0101 ', ' YYYYMMDD ') DATE1 from DUAL

--date converted to Julian
SELECT To_number (SUBSTR (To_char (' 2013-09-03 ', ' yyyy-mm-dd '), ' ccyyddd '), 2,6)) JULIAN from DUAL

Oracle Usage Summary

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.