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 |
ceecee17
Starting Member
1 Post |
Posted - 2013-05-06 : 16:49:35
|
Just wanted to help the people out there that do not know anything about SQL like me! Sample Tables:employee (Table)emp_ID fname lname dept_ID ----------- ------ ------- ----------- 1 John Doe 32 Jane Doe 23 Ron Smith 34 Nancy King 45 James Monroe 16 Lisa Jones 0department (Table)dept_ID dept_name ----------- ------------------------------ 1 Sales2 Customer Service3 Accounting4 Marketing5 PurchasingWrite the SQL required to do the following: 1. Add a new department named Janitorial Services whose department ID is 6. 2. Modify the database to reflect that Ron Smith has changed jobs and now works in the Sales Department. 3. Retrieve the last name and department name of all employees whose last name begins with A through J. |
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2013-05-06 : 17:31:02
|
How does that help people that "do not know anything about SQL".Why would people that "do not know anything about SQL" be in a SQL job interview?CODO ERGO SUM |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
waterduck
Aged Yak Warrior
982 Posts |
Posted - 2013-05-07 : 00:37:12
|
Hi,3. Retrieve the last name and department name of all employees whose last name begins with A through J. is the answer as below?WHERE ASCII(UPPER(lname)) > 64 AND ASCII(UPPER(lname)) < 75) |
|
|
Transact Charlie
Master Smack Fu Yak Hacker
3451 Posts |
Posted - 2013-05-07 : 05:28:53
|
Are you joking?WHERE lname LIKE '[A-J]%' Transact CharlieMsg 3903.. The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION. http://nosqlsolution.blogspot.co.uk/ |
|
|
waterduck
Aged Yak Warrior
982 Posts |
Posted - 2013-05-07 : 06:31:04
|
hahahaa....i need a gun! |
|
|
|
|
|