Linked Questions

20 votes
3 answers
14k views

Please suggest a data structure for representing a list of records in memory. Each record is made up of: User Name Points Rank (based on Points) - optional field - can be either stored in the record ...
Sachin Joseph's user avatar
5 votes
6 answers
18k views

I have a History Table in SQL Server that basically tracks an item through a process. The item has some fixed fields that don't change throughout the process, but has a few other fields including ...
6 votes
3 answers
7k views

Hi, I have “Table1” as shown above with some records on it and the column names are Id, Name and [Entry Date]. Column Id is primary key, I am using SQL Server 2005. I want to write a query that ...
Fayde's user avatar
  • 193
4 votes
1 answer
15k views

Which of the following two SQL statements will return the desired result set (i.e. the ten rows with Status=0 and the highest StartTimes)? Will both statements always return the same result set (...
nabulke's user avatar
  • 11.3k
4 votes
2 answers
5k views

My table has 81,225 rows. I am trying to select every 285th row: Select * From Test A Where ROWID > 0 AND ROWID <= 81225 AND ROWID % 285 = 285 % 285 This query returns 285 rows as expected, ...
Nick Johnson's user avatar
1 vote
4 answers
8k views

I had been looking for the query to find the 3rd highest salary from the database (using Oracle database). I found the below query - SELECT * FROM ( SELECT e.*, row_number() over (order by sal DESC)...
Justin's user avatar
  • 102
0 votes
3 answers
2k views

It is possible to select last row selected by mysql_query in php without iterating using mysql_fetch_row from first row till last? If so, what should I use?
sergtk's user avatar
  • 11k
1 vote
2 answers
4k views

How can i find nth ROW from SQLiteDatabase in android, i want something like this SELECT * FROM Student WHERE rownum = 2; Here rownum is not a part of Table in my DB looks like -------- Number --...
user1403653's user avatar
1 vote
2 answers
6k views

I am using sybase database. I have to select every nth row from my table selfjoin(id,salary); I use select top 1 * from (select top 4 * from selfjoin order by id desc) order by id I get an error ...
avinashse's user avatar
  • 1,458
1 vote
1 answer
4k views

I am a little new to using vb.net and SQL so I figured I would check with you guys to see if what I am doing makes sense, or if there is a better way. For the first step I need to read in all the rows ...
SZman's user avatar
  • 141
1 vote
4 answers
3k views

There are n record in a table ABC . write a query to select every 5th record from the table. for example there are 30 rows in a table. so query should output 5th,10th,15th,20th, 25th and 30th ...
avinashse's user avatar
  • 1,458
2 votes
2 answers
905 views

Right now I have a problem because importing rows to my database from an external source happens so quickly. If more than one row is created with the exact same publish date, it is impossible to sort ...
David Vincent Gagne's user avatar
0 votes
1 answer
2k views

Button to click <form action='' method='POST'> <input type='submit' name='submit' /> </form> Variable to be incremented on button click $currentid="1"; if(...
pervaiz's user avatar
2 votes
1 answer
1k views

How can i get the nth row position from table without using limit ? I have a table with four fields id,name,country,description. The query is returning by condition country = 'asia'. The total ...
Paulraj's user avatar
  • 3,417
1 vote
3 answers
671 views

Here is my SQL query: select * from TABLE T where ROWNUM<=100 If i execute this and then re-execute this, I don't get the same result. Why? Also, on a sybase system if i execute set rowcount 100 ...
Kraken's user avatar
  • 24.3k

15 30 50 per page