![]() Related Questions Latest Answer : no difference ... Read Answers (9) | Asked by : Suyog How do i write a function that returnsmore than 1 records from a tablefor example in sql server there is a solution as create function f1() return table asselect * from emphow do i do the same in oracle. plz help I want to convert source Date format "CCYYMMD" to "CCYY-MM-DD23.59.59.999999" in to the target for example source date is 19980224it should be in target 1998-02-24.23.59.59.999999 Read Answers (1) | Asked by : Sachin Hi 1.What is difference between procedure and function?1. procedure may or may not return values whereas function must return value2. we can call the function in the sql statements whereas we can't call the procedureExcept these two, is there any difference between these two.2. What is pl/sql table and what is use of it. In which case, we can use it3. What is ref cursor, what is the use of it.4.how the function will return multiple values. Pls give me with examples Latest Answer : We can call a function from anonymous block as a part of sql statement written in that block.eg: create or replace function fn_emp(v_empno in number)return varchar2 isbeginselect ename into v_ename from empwhere empno=v_empno;return v_ename;end;this function ... Read Answers (2) | Asked by : Anuruddha SINGH Latest Answer : Hi.....yes we can create a table by using a procedure or a function but it must be done by Dynamic SQL. Dynamic SQL is a programming technique that enables you to build SQL statements dynamically at runtime. lets say you want to create an EMP table ... Read Answers (1) | Asked by : sarada Hi,1. Iam looking for sample program for ref cursor. ref cursor can be associated with many select statements and we can use the ref cursor to return the multiple value from the procedure or function. Latest Answer : Hi,Let me answer your second questin first. Why ref cursor instead of %ROWTYPE.%ROWTYPE is used for fetches record/row of a single table.OR in case of columns of different tables then you have to create a RECORD and then used %ROWTYPE.But ... Latest Answer : HI ALL,try this..,create or replace procedure ddl_proc(tabname in varchar2)asv_cursor INTEGER;ddl_exe INTEGER;beginv_cursor:=Dbms_sql.open_cursor;Dbms_sql.Parse(v_cursor,' Create Table '||tabname||' (col1 number(2),col2 varchar2(5)) ',Dbms_sql.native);ddl_exe:=Dbms_sql.Execute(v_cursor);dbms_sql.close_cursor(v_cursor);end ... Latest Answer : you can use SYSDATE oracle.lv_today := sysdate;or select sysdate into lv_today from dual;both the statements assign sysdate to lv_today ... Latest Answer : To created flat files, or read flat files in a procedure or function, the built-ins in the UTL_FILE package can be used. ...
Sponsored Links
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||