Click here to Skip to main content
11,576,293 members (63,875 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: SQL
select * from table name;

in the table all details are displayed. ok fine.

--course wise query

select Date,Session,Faculty_Code from Tb_SCh_TIme_Table where Course='REO' order by Date,session

when i run above query for particular course REO i get the ouput.ok fine.

Date Session Faculty_Code

2013-01-07 1 GS
2013-01-07 2 NR
2013-01-07 3 RJ
2013-01-07 4 CM
2013-01-08 1 RK
2013-01-08 2 CM
2013-01-08 3 NR
2013-01-08 4 SJ

But i want the output for All course means how can i do to write the query for all course.

how can i do, for all course details to get the output.

help me.
Posted 17-Jan-13 2:26am
Edited 17-Jan-13 3:05am
Zoltán Zörgő at 17-Jan-13 8:30am
What about not adding where clause?
select Date,Session,Faculty_Code,Course from Tb_SCh_TIme_Table order by Date,session
This is what you have asked for. But I am afraid you want something else, but what?
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Just remove the WHERE clause:
SELECT Date,Session,Faculty_Code FROM Tb_SCh_TIme_Table ORDER BY Date,session
Rate this: bad
Please Sign up or sign in to vote.

Solution 2


Just remove the where condition from the query.
so you can get the all course detail.

select Date,Session,Faculty_Code from Tb_SCh_TIme_Table order by Date,session

i hope this will help you.

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 285
1 F-ES Sitecore 140
2 Abhinav S 115
3 Lucifier Rocks 105
4 OriginalGriff 105
0 OriginalGriff 705
1 Sergey Alexandrovich Kryukov 630
2 Abhinav S 438
3 F-ES Sitecore 410
4 Suvendu Shekhar Giri 365

Advertise | Privacy | Mobile
Web04 | 2.8.150603.1 | Last Updated 17 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100