CREATE or replace JAVA SOURCE NAMED MyTimestamp AS import java.lang.String; import java.sql.Timestamp; public class MyTimestamp { public static String getTimestamp() { return (new Timestamp(System.currentTimeMillis())).toString(); } };
create or replace function my_timestamp return varchar2 AS LANGUAGE JAVA NAME 'MyTimestamp.getTimestamp() return java.lang.String';