Move the Employees table from the dbo schema to the HumanRwsources schema.

Task: Move the Employees table from the dbo schema to the HumanRwsources schema.
Solution I have: ALTER TABLE dbo.Employees ALTER SCHEMA HumanResources

The following 2 options are not correct:
1:
ALTER TABLE dbo.Employees TRANSFER HumanResources
Explanation why this option is not correct: " should not use ALTER TABLE. It only allows the structure of the table not the schema that contains the table."
Question A: Why we cannot use ALTER TABLE here but it is okay to use it in the first answer (correct on above)?

2:
ALTER SCHEMA HumanResources TRANSFER dbo.Employees
Question B: Why this answer is not correct? What the following code does anyway?
LVL 34
Mike EghtebasDatabase and Application DeveloperAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jim HornMicrosoft SQL Server Data DudeCommented:
2 is correct, or at least the same syntax as successful object schema transfers I've done in the past.

Still studying for the SQL 08 Development exam?

>Question B: Why the answer below is not correct?
Just for kicks and giggles, why don't you post the error message returned when you execute this and it throws the error.  The only answer off the top of my head is that the logged in user does not have privs to alter objects in both schemas.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Mike EghtebasDatabase and Application DeveloperAuthor Commented:
No. it is for 2012. I think 2008 is no longer offered.

On the error message, I am not actually running the code. This is a sample exam question I am investigating.
Jim HornMicrosoft SQL Server Data DudeCommented:
Kinda hard to verify that an answer is correct if you're not coding it, and I highly recommend practicing these in SSMS instead of just trying to memorize answers, so I'll stick to my guns and say 2 is correct.
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Mike EghtebasDatabase and Application DeveloperAuthor Commented:
With SQL Servers prior to 2012, I guess we had separate certifications for developers and db administrators. But now, with SQL Server 2012 there is just MCSA (db administrators). MCSA for 2012 includes three certifications listed below:

70-461: Querying Microsoft SQL Server 2012
70-462: Administering Microsoft SQL Server 2012 Databases
70-463: Implementing a Data Warehouse with Microsoft SQL Server 2012

I am studying for 70-461 now. And, this question is sore of out of place I thing and it belongs to 70-462.  So, when I study later 70-462, I will focus on these type of questions.

BTW, how do you rate these 3 sections in scale of 1-10 as far as difficulty is concerned for a starter?

Thanks,

Mike
Jim HornMicrosoft SQL Server Data DudeCommented:
70-461 was pretty easy for me, as I've been doing T-SQL for sevenish years now, and the 2012 exam was the first one I've taken that wasn't heavily weighted towards what was new in that version.

70-462 I haven't looked at yet.

70-463 I studied a little and took a practice exam.  The SSIS and data warehousing parts were fine except when they asked about seldom-used components and script source/destination.  The MDM and DQS I bombed as I didn't have previous experience in them.
Jim HornMicrosoft SQL Server Data DudeCommented:
Thanks for the grade.  Good luck with your project.  -Jim
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.