I am trying to create a composite primary key in Sql server. The syntax I have tried is:
create table Installment_details
(
constraint P_key primary key(Account_No,month),
Account_No int not null,
foreign key (Account_No) references Account_details(Account_no) on delete cascade,
Month char(15) not null,
D@te date,
Receipt_no varchar(15),
Amount_received int,
Amount_left int,
Amount_receiver char(50),
)
As far as I know it should create column with column name P_key for primary key but whenever I make a entry in table it doesn't show this column.

P_keyunderKeys, but nowhere else. To refer to the primary key in foreign key constraints, you will also always need to name the columns involved ((Account_No, month)), never the constraint name itself.