Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> limit number of Rows in a table

limit number of Rows in a table

From: Kock, Gerd <GKock_at_pdv-Online.de>
Date: Sat, 21 Jul 2001 21:26:35 GMT
Message-ID: <90333AAED533D411950600104B45E019031663EB@pdv-exchng.pdv-online.de>

you may Raise_application_error(...)
Gerd

-----Ursprüngliche Nachricht-----
Von: Marco Wolfgarten [mailto:mwolfgarten_at_web.de] Bereitgestellt: Dienstag, 3. Juli 2001 16:39 Bereitgestellt in: server
Unterhaltung: Limit number of Rows in a table Betreff: Limit number of Rows in a table

Hi there!

I'm trying to limit the number of rows in a table -> No INSERT must be possible.
I tried to do this using a trigger, but I have no idea to forbid the transaction:

create or replace trigger trg_limit_Customers before INSERT ON tbl_Customers
declare

	numRows integer;
begin           
	SELECT Count(*) into numRows from tbl_Customers;
	if numRows>25 then
		????? --Do not allow to insert more rows!
	end if;

end;

Does anybody know which command I have to use, or which other solution may fit
this problem?

Thanks for your help in advance!

Marco

-- 
__________________________________________________________
News suchen, lesen, schreiben mit http://newsgroups.web.de
Received on Sat Jul 21 2001 - 16:26:35 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US