I need to create a table Branch with columns branch_name and branch_city character type, assets as integer type. branch_name is the primary key and I have to ensure that assets are non negative.
I tried like
CREATE TABLE Branch
(
branch_name navarchar(100) primary key,
branch_city nvarchar(100),
assests int NOT NULL
)
You need to define a datatype for your primary key, and you need to add a
CHECKconstraint to ensureassetsis non-negative: