--Creating a database with few file groupsCREATE DATABASE TestDBONPRIMARY (NAME = PrimaryFile, FILENAME = 'c:\TestDB.mdf', SIZE = 100MB),FILEGROUP DefaultFileGroup ( NAME = DefaultFile, FILENAME = 'c:\DefaultFile.ndf', SIZE = 100MB)LOG ON (NAME = DemoDBLog, FILENAME = 'c:\TestDB.ldf', SIZE = 100MB)gouse TestDBgo-- Setting the default file groupALTER DATABASE TestDB MODIFY FILEGROUP DefaultFileGroup defaultgo--Creating a demo table in the default file groupcreate table MyTable (i int not null) on DefaultFileGroupgo--see that the table is created on the DefaultFileGroupexec sp_help MyTable--Adding a clustered index without speciying where it will be locatedcreate clustered index cix_MyTable_i on MyTable (i) on [primary]go--The table is now on the primary data file and not on the default data filesp_help MyTable--cleanupuse mastergodrop database TestDB