hii,
here i had referred ID as a foreign key which is the primary key of another table.
see i will show you my tables
mood table.
CREATE TABLE tblmood(
moodid INT PRIMARY KEY IDENTITY(1,1) ,
mood VARCHAR(30) NOT NULL,
ID INT FOREIGN KEY REFERENCES signup(ID)
);
Signup table
CREATE TABLE signup(
ID INT PRIMARY KEY IDENTITY(1,1) ,
username VARCHAR(30) NOT NULL,
email VARCHAR(30) NOT NULL,
passwd VARCHAR(30) NOT NULL,
);
so , whats the problem is in the mood table i am getting the null , instead the user id from the signup table
Someone show me the right direction .
Thanks in Advance

Nitin SontakkeRank #264 · 9.6K reputationPosted Feb 23, 2018, 11:33 PM EST
Piyush PansuriyaRank #454 · 5.5K reputationPosted Feb 23, 2018, 11:18 PM EST
Nitin SontakkeRank #264 · 9.6K reputationPosted Feb 23, 2018, 11:24 PM EST
Nitin SontakkeRank #264 · 9.6K reputationPosted Feb 24, 2018, 12:12 AM EST
Nitin SontakkeRank #264 · 9.6K reputationPosted Feb 24, 2018, 12:36 AM EST
Sindhu Kavuri64 reputationPosted Feb 23, 2018, 11:25 PM EST
Sindhu Kavuri64 reputationPosted Feb 23, 2018, 11:27 PM EST
Sindhu Kavuri64 reputationPosted Feb 23, 2018, 11:45 PM EST
Sindhu Kavuri64 reputationPosted Feb 24, 2018, 12:20 AM EST