Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Vancatu
Starting Member
2 Posts |
Posted - 2011-10-06 : 08:49:35
|
Hello fellows,I'm new into SQL query's and I'm currently performing some query exercises and I can need some help with it.I'm using an ERD in MYSQL Workbench.Now I want to know via a guery which departments don't have employees.I also want to know which courses are plannend for which no one is registered. I want to display the code of that particular course.Furthermore I want to know which emplyees don't act as teachers. I want to display the name of those employees.The relations are head INT (head of department) with enr INT (employee number), head INT with dep INT (department), enr INT with student INT, chief INT with dep INT, enr INT with teacher INT, code with course, and course and startdate with course and start date. |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2011-10-06 : 08:53:32
|
If this is MySQL then the given answers may not work for you because this is a forum for MS SQL Server only. No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-10-06 : 08:55:07
|
| have a look at LEFT JOIN in books online and you'll be able to achieve queries above. Try it out and if you face problems post and we will help.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-10-06 : 09:08:14
|
ah...MySQL...missed that Then not sure whether my suggestion will work.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
Vancatu
Starting Member
2 Posts |
Posted - 2011-10-06 : 09:22:48
|
quote: Originally posted by webfred If this is MySQL then the given answers may not work for you because this is a forum for MS SQL Server only. No, you're never too old to Yak'n'Roll if you're too young to die.
Okay, then I misunderstood. So no one can help me? :( |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-10-06 : 09:25:13
|
quote: Originally posted by Vancatu
quote: Originally posted by webfred If this is MySQL then the given answers may not work for you because this is a forum for MS SQL Server only. No, you're never too old to Yak'n'Roll if you're too young to die.
Okay, then I misunderstood. So no one can help me? :(
Try your luck at www.dbforums.com------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|
|
|