I want to move a table into a specific Schema using T-SQL? I am using SQL Server 2008.
相关问题
- sql execution latency when assign to a variable
- What is the best way to cache a table from a (SQL)
- php PDO::FETCH_ASSOC doesnt detect select after ba
- Bulk update SQL Server C#
- SQL to Parse a Key-Value String
相关文章
- Entity Framework 4.3.1 failing to create (/open) a
- How to truncate seconds in TSQL?
- Code for inserting data into SQL Server database u
- SQL Server 2008 Change Data Capture, who made the
- Delete Every Alternate Row in SQL
- Linux based PHP install connecting to MsSQL Server
- SQL Azure Reset autoincrement
- How do we alias a Sql Server instance name used in
If you want to move all tables into a new schema, you can use the undocumented (and to be deprecated at some point, but unlikely!)
sp_MSforeachtable
stored procedure:Ref.:
ALTER SCHEMA
SQL 2008: How do I change db schema to dbo
Short answer:
I can confirm that the data in the table remains intact, which is probably quite important :)
Long answer as per MSDN docs,
If it's a table (or anything besides a Type or XML Schema collection), you can leave out the word Object since that's the default.