TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sindhu Kavuri
NA
98
12.3k
my foreign key is giving null values
Feb 24 2018 4:06 AM
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
Reply
Answers (
9
)
when we are using inline table valid functions?
how to create a table in stored procedure