-2

In one of my Client code I have seen,

Create table Students (id int, name varchar 100) on PRIMARY

What is the importance of "on" in create table.?? Thank you in advance.

felix Antony
  • 1,450
  • 14
  • 28

2 Answers2

2

Specifies the partition scheme or filegroup on which the table is stored

CREATE TABLE (SQL Server)

mehdi lotfi
  • 11,194
  • 18
  • 82
  • 128
-1

When you create a database in Microsoft SQL Server you can have multiple file groups, where storage is created in multiple places, directories or disks. Each file group can be named. The PRIMARY file group is the default one, which is always created, and so the SQL you've given creates your table ON the PRIMARY file group.

See the question here

Community
  • 1
  • 1
Mijoe
  • 236
  • 2
  • 9