jojacafe
8/17/2016 - 1:56 PM

Create table

Create table

  create table Device (
	DeviceId int not null IDENTITY(0,1) PRIMARY KEY,
    Device nvarchar(max) not null,
	DeviceType nvarchar(max) not null,
    NotificationToken nvarchar(max) not null,
    LanguageId int not null default 0 FOREIGN KEY REFERENCES Language(LanguageId),
    UserId nvarchar(128) null FOREIGN KEY REFERENCES AspNetUsers(Id),
	AppVersion nvarchar(255) null
);
CREATE TABLE Persons
(
P_Id int NOT NULL IDENTITY(1,1) PRIMARY KEY,
LastName varchar(255) NOT NULL,
FirstName varchar(255),
Address varchar(255),
City varchar(255),
O_Id int FOREIGN KEY REFERENCES Orders(O_Id)
)