Geeks Talk

Prepare for your Next Interview




Display n-1 rows from a table

This is a discussion on Display n-1 rows from a table within the SQL Server forums, part of the Databases category; How query and to display n-1 rows from a table. Kindly give me query and also the method dbtester...


Go Back   Geeks Talk > Databases > SQL Server

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 12-12-2006
Junior Member
 
Join Date: Oct 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
dbtester is on a distinguished road
Display n-1 rows from a table

How query and to display n-1 rows from a table.

Kindly give me query and also the method

dbtester
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 12-12-2006
Expert Member
 
Join Date: Jun 2006
Posts: 140
Thanks: 2
Thanked 12 Times in 9 Posts
Jim.Anderson is on a distinguished road
Re: Display n-1 rows from a table

Quote:
Originally Posted by dbtester View Post
How query and to display n-1 rows from a table.

Kindly give me query and also the method

dbtester
Could you explain what exactly n-1 rows...
Reply With Quote
  #3 (permalink)  
Old 12-20-2006
Expert Member
 
Join Date: Sep 2006
Location: India
Posts: 131
Thanks: 1
Thanked 20 Times in 20 Posts
Innila is on a distinguished road
Re: Display n-1 rows from a table

Quote:
Originally Posted by dbtester View Post
How query and to display n-1 rows from a table.

Kindly give me query and also the method

dbtester
Need clarification reg ur question.
Do u want to give the value 'n' in the where clause & retrieve n-1 rows?
Reply With Quote
  #4 (permalink)  
Old 02-07-2008
Junior Member
 
Join Date: Feb 2008
Location: mumbai
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
sr_2407 is on a distinguished road
Re: Display n-1 rows from a table

my Query for this is as follows,

select * from dept
where rownum<=(select count(*)-1 from dept)
Reply With Quote
Reply

  Geeks Talk > Databases > SQL Server


Thread Tools
Display Modes


Similar Threads

Thread Thread Starter Forum Replies Last Post
Inode Table fred Unix/Linux 2 10-22-2007 04:15 PM
don't use 100% for main table... psuresh1982 HTML & CSS 3 05-17-2007 09:30 AM
Microsoft CRM : Display a SharePoint document library in a Microsoft Dynamics CRM 3.0 form Jim.Anderson Microsoft CRM 0 09-27-2006 07:39 AM
Need predefined Function or code for Data Display in PHP norman PHP 0 07-17-2006 05:17 PM
In one table... Allan Paul Oracle 4 06-20-2006 04:11 AM


All times are GMT -4. The time now is 05:27 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 GeekInterview.com. All Rights Reserved