Experiences in Oracle Development

Source: Internet
Author: User
Oracle date _:

Submitdate = datetime. parse (submitdate). tostring ("D-M month-YYYY "); Current Time: sysdate () To_date ('1970-01-02 ', 'yyyy-m-dd') Select count (1) From l_perm where cancel <> 'y' and (sysdate-perm_date)> 3

In PL/SQL develop for debugging and testing, I wrote SQL statements in SQL Server before:

Insert... (............) values (......., '2017-7-20 11:25:36 ',....) -- This statement applies to SQL Server

An error occurred! I thought that the date Separator of Oracle is # Like access, and I tried again:

Insert... (............) values (......., #11:25:36 #,....) -- This statement applies to MS Access

Check onlineArticleThis is the case in many places:

Insert... (............) values (......., to_date ('1970-7-20 11:25:36 ', 'yyyy-mm-dd hh24: MI: ss '),....)

To_date, to_char ,.

Find an example of how to input and output date data.The timestamp keyword is displayed. The preceding SQL statement can be written as follows:

Insert... (............) values (......., timestamp '2017-7-20 11:25:36 ',....)

Select the first N records: Rownum <10 is the first 10 data records, in the format
Select * from t where rownum <10
Between the two
Select * from (select rownum R, A. * From tablename A where rownum <= 100) Where R> = 60; Sequence: Select c_order.nextval as ID from Dual

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.