Specifying a file group | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Specifying a file group

Is there a way to specify a particular filegroup for the table to be created in when using a statement like the following: SELECT * FROM TABLE_A
I think it will always be created in the default filegroup. But you can specify a custom default filegroup. ———————–

When you create TABLE_B, use ON filegroup_name option.
Luis Martin
SQL-Server-Performance.com All postings are provided “AS IS” with no warranties for accuracy.
i.e., use CREATE TABLE.. followed by INSERT INTO.. SELECT.., as opposed to SELECT INTO.., which is generally bad practice and can cause issues with locking in tempdb..sysobjects.
Tom Pullen
DBA, Oxfam GB
If you specify to create on a specific filegroup the table will be created, as it specifies the filegroup on which the table is stored. If filegroup is specified, the table is stored in the named filegroup. The filegroup must exist within the database. If DEFAULT is specified, or if ON is not specified at all, the table is stored on the default filegroup. Satya SKJ
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.