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
9 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Nitin SontakkePosted Feb 24, 2018, 4:33 AM
Nitin SontakkePosted Feb 24, 2018, 5:36 AM
Sindhu KavuriPosted Feb 24, 2018, 5:20 AM
Nitin SontakkePosted Feb 24, 2018, 5:12 AM
Sindhu KavuriPosted Feb 24, 2018, 4:45 AM
Sindhu KavuriPosted Feb 24, 2018, 4:27 AM
Sindhu KavuriPosted Feb 24, 2018, 4:25 AM
Nitin SontakkePosted Feb 24, 2018, 4:24 AM
Piyush PansuriyaPosted Feb 24, 2018, 4:18 AM