i want to create two table
CREATE TABLE [dbo].[User](
[UserID] [int] IDENTITY(1,1) NOT NULL,
[UserName] [varchar](30) NOT NULL,
[CreatedByID] [int] NULL
)
CREATE TABLE [dbo].[Product](
[ProductID] [int] IDENTITY(1,1) NOT NULL,
[ProductName] [varchar](30) NOT NULL,
[CreatedByID] [int] NULL
)
In product table how to set foreign key without a primary key.becouse i want to save createdByID same record
EXample:
UserID:1, UserName:admin, CreatedByID:1
UserID:2, UserName:client, CreatedByID:1