Path: utzoo!mnetor!uunet!mcvax!ukc!stc!ist!uel!andrew From: andrew@uel.uel.co.uk (Andrew Josey) Newsgroups: comp.databases Subject: Informix 4GL Question? Message-ID: <714@uel.uel.co.uk> Date: 4 Feb 88 17:37:21 GMT Organization: AT&T Unix Europe, London, UK Lines: 25 Keywords: Informix 4GL When deleting records in my database I check whether they are referenced by any other records. This is currently done by code similar to the following : let counter = 0 select count (*) into counter from table where table.column = key if counter > 0 then cannot delete as referenced else delete end if As some of my database tables are large, I would like to find an alternative technique that terminates after finding the first match instead of searching the whole table. There may be something in the manual - but I have not spotted it. Thanks in advance. Please reply directly by e-mail. -- Andrew Josey, AT&T Unix Europe, a Division of AT&T (UK) Ltd. International House, Ealing Broadway, London W5 5DB, England, UK uucp:{ mcvax!ukc, attunix} uel!andrew { The usual disclaimer .... }