SQL database Oracle Database
Isnull (field name, replace value) ------------------------------------------------------------- nvl (field name, replace value)
Substring (field name, start position, cut length) ------------------------------------------ substr (field name, start position, cut length)
Getdate () ------------------------------------------------------------------------------- select sysdate from dual
Year (getdate () ----------------------------------------------------------------- select to_char (sysdate, 'yyyy') from dual
Month (getdate () ------------------------------------------------------------ select to_char (sysdate, 'mm') from dual
Day (getdate () ---------------------------------------------------------------- select to_char (sysdate, 'dd') from dual
Select datepart (hour, getdate () ---------------------------------- select to_char (sysdate, 'hh') from dual
Select datepart (minute, getdate () ----------------------------------- select to_char (sysdate, 'mi') from dual
Select datepart (second, getdate () -------------------------- select to_char (sysdate, 'ss') from dual
+ (Connection Symbol) -------------------------------------------------------------------------- |
'2017-03-29 11:40:28 '----------------------------------------------------------- to_date ('2017-03-29 11:40:28', 'yyyy/MM/dd hh: MI: ss ')
Uniqueidentifier extends sys_guid ()
Select sys_guid () from dual;
Create Table Test2
(
UUID varchar2 (200) default sys_guid (),
Uname varchar2 (20)
);
Insert into Test2 (uname) values ('hello ');
Insert into Test2 (uname) values ('World ');
Select * From Test2;