In PL/SQL I need to get like this scenario. if I am doing manipulation on a table, I need to display a record as Non-Updateable. It need to show a message to the user. How it is possible.Thanks in Advance.

Showing Answers 1 - 7 of 7 Answers

hemachandra

  • Mar 6th, 2006
 

Hi

You can write a trigger on that table or u can define a check constraint (I hope you must be having a rule on a column)

  Was this answer useful?  Yes

developer

  • Sep 14th, 2006
 

Hi Hemachander,

Can u give an example.

Thanks.

  Was this answer useful?  Yes

madhuri

  • Feb 23rd, 2007
 

create or replace trigger trg1
after insert or update or delete on tab1

begin

dbms_output.put_line('Changes have been made on table tab1');

end;

  Was this answer useful?  Yes

askvenki

  • Aug 13th, 2007
 

Madhuri
This is not possible, where the message will be printed if you execute
Table from another environment like Java, Net. In SQL I think it is not possible.

  Was this answer useful?  Yes

Madhuri
Its Correct but Its always recomand that you use BEFORE INSERT rather than AFTER INSERT for this situation. This Triggering Environment is applicable to any third-party application also Like JAVA..NET etc

Regds
Ramki YERRA
IBM India Pvt LTD, Bangalore-71
ramakrishna . yerra @ in . ibm . com

  Was this answer useful?  Yes

SonuYadav

  • Aug 11th, 2008
 

You can user sql%rowcount to check whether the dml does something or not
eg

begin
delete from tbl_xxx
where col_yyy = 'ASDF';
dbms_output.put_line (sql%rowcount);
end;

this way it will return the no of rows deleted

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions