Identity Insert and Table Variables – CONNECT issue
I was running some code the other day and was surprised by the result.
DECLARE @tmp TABLE (myID INT IDENTITY,MyChar VARCHAR(200))
INSERT...
2012-08-03
2,758 reads
I was running some code the other day and was surprised by the result.
DECLARE @tmp TABLE (myID INT IDENTITY,MyChar VARCHAR(200))
INSERT...
2012-08-03
2,758 reads
This is really scary. Someone being sued for downloading a porn movie illegally. I have nothing against porn, and I...
2012-08-03
898 reads
Apparently, SQL Saturday isn’t popular in the west. See for yourself. I wanted to see what cities frequently host SQL...
2012-08-03
1,570 reads
Well, that is one impressive dashboard of Audi RS4! It gives huge amount of flexibility for the driver to control...
2012-08-03
720 reads
This past week I was presented with a very unique issue. A call came in with a production issue on...
2012-08-03
771 reads
I just sent this off to a fellow DBA who wanted some resources. You may also be one of those,...
2012-08-02
997 reads
In my last post , we have discussed about orphaned uses and how to find out the orphaned users. In this...
2012-08-02
1,458 reads
Orphaned user is a common problem in SQL server world.When I was working on internal security audit of our production...
2012-08-02
1,733 reads
SQL Server 2012 introduces user-defined server roles. These user-defined server roles are similar to fixed server roles with only difference...
2012-08-02
2,888 reads
Are there things you need to make sure are running when your SQL Agent starts? Did you know that you...
2012-08-08 (first published: 2012-08-02)
3,359 reads
By Steve Jones
I was experimenting with CHOOSE() recently after I was asked a question. In a...
By DesertDBA
I did not expect 27 responses to my T-SQL Tuesday #204 invitation, but it...
Should you adopt an off-the-shelf AI tool, partner with a specialist, build in-house, or...
Has anyone ever seen this before? I have sysadmin permission on a server. I...
Comments posted to this topic are about the item Switching Schema II
Comments posted to this topic are about the item A Practical Approach to Automating...
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.beerWhat happens? See possible answers