Experience in Oracle Development

xiaoxiao2021-03-06  48

Oracle Date_:

SubmitDate = DateTime.Parse (Submitdate) .tostring ("D-M Month-etYyy);

Current time: sysdate ()

TO_DATE ('2002-01-02', 'YYYY-M-DD')

SELECT Count (1) from l_perm where ca zance <> 'y' and

sysdate-perm_date> 3

In PL / SQL DevelopP, try to test, I am writing the SQL statement previous in SQL Server:

INSERT INTO ... (..........) Values ​​(......., '2004-7-20 11:25:36', ....) Statements Suitable for SQL Server

Actually an error! I thought that Oracle's date type separator is like Access, I tried:

INSERT INTO ... (..........) Values ​​(......., # 2004-7-20 11: 25: 36 #, ....) Statement applies to MS Access

Go to check the online article, many places write:

INSERT INTO ... (..........) Values ​​(......., to_date ('2004-7-20 11:25:36 ",' YYYY-MM-DD HH24: MI: SS '), ....)

TO_DATE, TO_CHAR ,.

Find an example of how to input, output date type data. See the TimeStamp keyword, the SQL statement above can be written:

Insert Into ... (..........) Values ​​(......., timestamp '2004-7-20 11:25:36', ....)

Select the previous N records:

You can use ROWNUM <10, the top 10 data, format Select * from T where Rownum <10

SELECT * FROM (SELECT ROWNUM R, A. * From Tablename A WHERE ROWNUM <= 100) WHERE R> = 60;

Get sequences:

Select c_order.

NextVal as id from

Dual

转载请注明原文地址:https://www.9cbs.com/read-114973.html

New Post(0)