Hi,
 
a select is needed, but you can do
select ... from table where rowno <= 1
to assure that only one row will be in the resultset.
Do NOT use MIN(primary key column) or something like that.
Different releases with different optimizers would or
would not catch that only the first row of the whole table
has to be inspected.
 
Elke
SAP Labs Berlin
-----Original Message-----
From: Yusuf Gangat [mailto:[EMAIL PROTECTED]
Sent: Dienstag, 22. Juli 2003 10:29
To: [EMAIL PROTECTED]
Subject: Query to get the first row of a table

Hi

 

Can anyone tell me the sql I need to use to get the first row of a table without using “select * from tablename” and then using only the first row?

 

Thanks in advance

 

Yusuf Gangat
Programmer

Tel  : 031-2675000
Fax : 031-2675169
[EMAIL PROTECTED]

 

Disclaimer and confidentiality note


The information contained in this communication is confidential and may be legally privileged. It is intended solely for the use of the individual or entity to whom it is addressed and others authorised to receive it. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or taking action in reliance of the contents of this information is strictly prohibited and may be unlawful. Sweidan Trust is neither liable for the proper, complete transmission of the information contained in this communication nor any delay in its receipt.

 

 

 


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.498 / Virus Database: 297 - Release Date: 7/8/2003

Reply via email to