Click here to Skip to main content
15,885,914 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all

when i am writing select * from table_name, it is taking only the unique bill_no's and returning the values.
please tell me how to write a query where it will take all the values from the table even if there is duplicate bill_no also.

Note: bill_no is not primary key

XML
<pre lang="text">
bill_no  datetime                   amount
1;      "2014-12-23 17:36:07";      382.02
1;      "2014-12-23 09:08:37";      1452.38
2;      "2014-12-23 18:18:26";      472.99
2;      "2014-12-23 09:56:44";      380.95
3;      "2014-12-23 10:00:07";      666.67
3;      "2014-12-23 18:42:43";      159.18
4;      "2014-12-23 10:12:54";      200.00
4;      "2014-12-23 18:43:25";      77.31
5;      "2014-12-23 10:15:21";      7857.14
5;      "2014-12-23 18:45:27";      409.31
6;      "2014-12-23 20:50:56";      318.36
6;      "2014-12-23 10:16:00";      761.90
7;      "2014-12-23 20:59:59";      109.16
7;      "2014-12-23 10:16:58";      1571.43

</pre>




Thank you
Posted
Comments
Do you want datetime column also to show?
Thank you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900