Subject | Check if record exist |
---|---|
Author | Sibo Oskam |
Post date | 2005-01-27T09:04:11Z |
I want to check if a record exist in SQL. Of course I could use:
Select Count(*) From Person Where PersId=:PersId
and check if a what is returned is higher than 0, but if there are a lot of records that will take a lot of time
I want to something like:
Select First 1 Count(*) From Person Where PersId=:PersId
Or
Select Count(*) From Person Where PersId=:PersId And RecordCount<2
Both do not work. How do I do this.
Thanks,
Sibo
[Non-text portions of this message have been removed]
Select Count(*) From Person Where PersId=:PersId
and check if a what is returned is higher than 0, but if there are a lot of records that will take a lot of time
I want to something like:
Select First 1 Count(*) From Person Where PersId=:PersId
Or
Select Count(*) From Person Where PersId=:PersId And RecordCount<2
Both do not work. How do I do this.
Thanks,
Sibo
[Non-text portions of this message have been removed]