Yuri Marx · Jul 18, 2020

Execute create table in the Management Portal

Is it possible execute create table from management portal?

I tried this:

CREATE TABLE SQLUser.Teste(ID INT NOT NULL,  coluna1 VARCHAR(255),  coluna2 VARCHAR(255),  coluna3 VARCHAR(255),  coluna4 VARCHAR(255)CONSTRAINT TestePK PRIMARY KEY (ID))

Error message:

2 159
Discussion (3)1
Log in or sign up to continue

try it without  "CONSTRAINT TestePK PRIMARY KEY (ID)"
and without "ID INT NOT NULL, " 
so you get an autoincremented unique ID by default

Bumping into this question... almost a year late :-)...  that query had a sintax error... you should put a comma before constraint.

In any case, Robert answer is also OK... unless you don't want ID to be autoincremental but to decide which value should go in it for each row.