Thinking
Wednesday, October 3, 2012
Change schema name on Tables and Stored procedures in SQL Server 2005
SELECT '
ALTER SCHEMA dbo TRANSFER
' + s.Name + '.' + p.Name
FROM sys.tables p INNER JOIN sys.Schemas s on p.schema_id = s.schema_id
WHERE s.Name = '
CHANGE_ME_Username'
Results :ALTER SCHEMA dbo TRANSFER test.Table1
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)