Click here to Skip to main content
12,816,406 members (30,014 online)
Rate this:
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 3:26am
Updated 17-Jan-13 4:05am
Zoltán Zörgő 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
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170308.1 | Last Updated 17 Jan 2013
Copyright © CodeProject, 1999-2017
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