Blog Post

MVPs

I was having a conversation with Oracle professionals the other day and they started to discuss the Oracle ACE program...

2017-01-20

671 reads

Blog Post

Adding Application Name to Invoke-SqlCmd2

In a previous post, I expressed some frustration over Invoke-SqlCmd not setting an Application Name for its ODBC connection, leaving us with the generic .NET SqlClient Library when looking at active sessions...

2017-01-20

72 reads

Blogs

T-SQL Tuesday #204 – Are blogs still relevant? (Roundup)

By

I did not expect 27 responses to my T-SQL Tuesday #204 invitation, but it...

Build vs Buy AI: When to adopt, partner, build or buy

By

Should you adopt an off-the-shelf AI tool, partner with a specialist, build in-house, or...

What's New in SQL Server for the Developer: SQL Server 2012

By

Part 1 of my What's New in SQL Server for the Developer series. IIF,...

Read the latest Blogs

Forums

Switching Schema II

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Switching Schema II

A Practical Approach to Automating SQL Server Email Notifications

By Kunal Rathi

Comments posted to this topic are about the item A Practical Approach to Automating...

Data Lost in the Cloud

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Data Lost in the Cloud

Visit the forum

Question of the Day

Switching Schema II

I run this query:

SELECT 
 s.name AS schemaname
 , o.name AS objectname
 FROM sys.objects o
 INNER JOIN sys.schemas s ON s.schema_id = o.schema_id
 WHERE o.name = 'Beer'
I get two rows back for the objects, named dbo.beer and etl.beer. Both the tables have identical schemas and are not partitioned. There are 25 rows in dbo.beer and 0 rows in etl.beer. I run this code:
ALTER TABLE dbo.beer switch TO etl.beer
What happens?

See possible answers