Below I will give quick implementation
/******First Solution*******/
create table product 
(
            [id] int identity primary key,
            [name] nvarchar(50),
            [description] nvarchar(50)
)
Go
Set IDENTITY_INSERT product off
Go
insert into product values
(1,'tv','52 inches '),
(2,'laptops','16 inches '),
(3,'desktop','32 inches ')
Go
select * from product
/******Second Solution*******/
create  table productsales
(
            id int  primary key identity, 
            unitprice int,
            quantitysold int
)
Go
Set IDENTITY_INSERT productsale off
Go
insert into productsales 
(id ,unitprice ,quantitysold)
values
(1,100,5)
No comments:
Post a Comment