Multiple choice technology databases

Which of the following statements can you use to create a filegroup?

  1. ALTER DATABASE … ADD FILE

  2. ALTER DATABASE … MODIFY FILEGROUP

  3. ALTER DATABASE … ADD FILEGROUP

  4. ALTER DATABASE … REMOVE FILEGROUP

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

To create a new filegroup in SQL Server, you use the ALTER DATABASE statement with the ADD FILEGROUP clause. The ADD FILE clause is used to add actual data files to an existing filegroup, MODIFY FILEGROUP changes filegroup properties, and REMOVE FILEGROUP removes an existing filegroup. Only ADD FILEGROUP creates a new filegroup.