hai every one
i donot know this is the right forum to ask a SQL related question but certainly my many doubts were cleared out here so hopfully i will get an answer........this time also
so my question is
How can we select the Top ( maximum ) 5 values form a table just makeing use of sql query.....?
thanks in advance...
keep smiling
austindataset.tables("table").rows.count will get you the number of rows in a dataset. But I am not sure how you would do it with a db without using some sort of stored procedure. If you have a fixed number of enties in the db this would bhe very easy to do, but I am assuming this is variable. How many entries are we talking about? If it is not a huge number you might just put them into a dataset and write them out from that.SELECT TOP 10 * FROM TABLE1;
10 IS THE NO OF ROWS
TABLE1 IS THE TABLE NAME
THANKSGood to know.
i donot know this is the right forum to ask a SQL related question but certainly my many doubts were cleared out here so hopfully i will get an answer........this time also
so my question is
How can we select the Top ( maximum ) 5 values form a table just makeing use of sql query.....?
thanks in advance...
keep smiling
austindataset.tables("table").rows.count will get you the number of rows in a dataset. But I am not sure how you would do it with a db without using some sort of stored procedure. If you have a fixed number of enties in the db this would bhe very easy to do, but I am assuming this is variable. How many entries are we talking about? If it is not a huge number you might just put them into a dataset and write them out from that.SELECT TOP 10 * FROM TABLE1;
10 IS THE NO OF ROWS
TABLE1 IS THE TABLE NAME
THANKSGood to know.