1

I am trying to create a simple node table, using:

CREATE TABLE Person (ID INTEGER PRIMARY KEY, name VARCHAR(100)) AS NODE

But whatever I try I get an error:

Incorrect syntax near the keyword 'as'. as if it doesn't understand the 'As Node' part.

I am using SQL Server 13.0.1601.
Database compatibility: SQL Server level 2016(130)
SSMS: v17.2
@@version: "Microsoft SQL Server 2016 (RTM) - 13.0.1601.5 (X64) Apr 29 2016 23:23:58 Copyright (c) Microsoft Corporation Express Edition (64-bit) on Windows 10 Pro 6.3 (Build 14393: ) (Hypervisor)"

Jerry Nixon
  • 31,313
  • 14
  • 117
  • 233
Lexius
  • 75
  • 7

1 Answers1

4

You can't do CREATE TABLE (SQL Graph) in earlier versions of SQL Server, because it applies to SQL Server 2017.

See the documentation.

Enter image description here

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Ilyes
  • 14,640
  • 4
  • 29
  • 55