Hoe to DROP any Object from database



Hoe to DROP any Object from database
--==================================================================


Create Table XX_EMP_TL
(
EMP_ID  NUMBER,
EMP_NAME VARCHAR2(100),
EMP_DOB  DATE,
EMP_GRADE  CHAR
)


select * from XX_EMP_TL

--=====================================
-- Drop Table
--=====================================

DROP Table XX_EMP_TL

select * from XX_EMP_TL

--=====================================
-- Drop View
--=====================================

CREATE OR REPLACE View XX_EMP_V
AS
select EMP_NAME, EMP_GRADE,EMP_ID, EMP_DOB from XX_EMP_TL

select * from XX_EMP_V

drop view XX_EMP_V







--=====================================
-- Drop Procedure
--=====================================

DROP PROCEDURE XX_EMP_PROC

desc XX_EMP_PROC

create or replace procedure XX_EMP_PROC (
   ERRBUF               OUT      VARCHAR2,
   RETCODE              OUT      NUMBER
)
AS
BEGIN
null;
END;




--=====================================
-- Drop Function
--=====================================

DROP FUNCTION XX_EMP_FUN

DESC XX_EMP_FUN

create or replace function XX_EMP_FUN (    P_EMP_NO  VARCHAR2 ) return VARCHAR2
AS
V_NAME VARCHAR2(100);
BEGIN

select EMP_NAME INTO V_NAME
from XX_EMP_TL
where emp_id = P_EMP_NO;

Return ( V_NAME );
END;




Comments

Popular posts from this blog

E-Text Report In Fusion | Types of E-Text reports

Supplier API's

How to pass default Parameter in cursor