I am new in oracle so I am not able to write this query in Oracle its showing me some compile time error
main issues are:
1) Not able to use @@identity option which is in sql and return last inserted id (as its auto insert value)
ALTER PROCEDURE [dbo].[Insert_Update_Students]( @SelectedCourse varchar(4000) = NULL ,@StudentID int = NULL output ,@UserID int = NULL ,@YogaBefore bit = NULL ,@YourComment varchar(250) = NULL ) AS BEGIN SET NOCOUNT ON; IF(@StudentID IS NULL OR @StudentID <= 0) BEGIN INSERT INTO Students( [SelectedCourse] ,[UserID] ,[YogaBefore] ,[YourComment] ) VALUES( @SelectedCourse ,@UserID ,@YogaBefore ,@YourComment ) set @StudentID=@@identity; END ELSE BEGIN UPDATE Students SET[SelectedCourse]=@SelectedCourse ,[UserID]=@UserID ,[YogaBefore]=@YogaBefore ,[YourComment]=@YourComment where [StudentID]=@StudentID END END