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
Bineesh Viswanath
NA
1k
777.7k
Primary and Foreign Key in SQL
Jun 14 2013 5:24 AM
Sir, I am now in SQL training.
I have a doubt in the case of Primary and Foreign Key.
Look a Table:-
tbl_Class: classId(PK),className,noOfseats
tbl_Division:divisionId(PK),divisionName,classId(FK_tbl_Class)
In this table I set classId and divisionId as IDENTITY
when I do a Insert into procedure, I want to put same data the classId carry in tbl_Class.
is there any way to auto add the column like classId in the table where they act as FK?
Reply
Answers (
2
)
Normalization in SQL
INSERT Auto Incremented PK from Table A into FK of Table B