>
///////// StudentTable with reference of genderId /////////////////
CREATE TABLE [dbo].[student](
[std_id] [int] IDENTITY(1,1) NOT NULL,
[std_name] [varchar](50) NULL,
[std_fname] [varchar](50) NULL,
[std_nic] [varchar](50) NULL,
[genderId] [int] NULL,
CONSTRAINT [PK_student] PRIMARY KEY CLUSTERED
(
[std_id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
//////////////////// GenderTable Male/Female
CREATE TABLE [dbo].[Gender](
[genderId] [int] IDENTITY(1,1) NOT NULL,
[gender] [nchar](10) NULL,
CONSTRAINT [PK_Gender] PRIMARY KEY CLUSTERED
(
[genderId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]