Sqlserver
 sql >> Datenbank >  >> RDS >> Sqlserver

In SQL Server 2008 kann ich Tabellenwertparameter von NHibernate an meine gespeicherte Prozedur übergeben. So erreichen Sie dasselbe in Oracle

CREATE OR REPLACE TYPE employeeType AS OBJECT (employeeId INT, employeeName VARCHAR2(50));

CREATE TYPE ttEmployeeType AS TABLE OF employeeType;

CREATE PROCEDURE testCustom (pLocation ttEmployeeType)
AS
BEGIN
        INSERT
        INTO    employee (emp_id, emp_name)
        SELECT  *
        FROM    TABLE(pLocation);
END;