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
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment