直接open cur from sql;即可. 例子: create or replace procedure test(tableName varchar2) is TYPE cur_type IS REF CURSOR; cur cur_type; ajob char); curSql char); begin cursql :='select job from '||tableName; dbms_output.put_line('cursql'||cursql); open cur fo
一.创建存储过程 if Exists(select name from sysobjects where NAME = 'sp1LoginUser' and type='P')drop procedure sp1LoginUserGOCREATE PROCEDURE [dbo].[sp1LoginUser]-- Add the parameters for the stored procedure here@username NVARCHAR(50)ASBEGINDECLARE @identit
SELECT supplier_id, max(evidence_date) AS evidence_date,max(TD_SUPPLIER_EVIDENCE_INFO_ID) AS TD_SUPPLIER_EVIDENCE_INFO_ID FROM TD_SUPPLIER_EVIDENCE_INFO GROUP BY supplier_id ORDER BY evidence_date desc; 使用group by 查询字段需要 max min avg count sum 等方法控制