Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Identity Column

Author  Topic 

asm
Posting Yak Master

140 Posts

Posted - 2010-05-20 : 01:52:06
Hi,

I am designing database table...
Table 1 - Master Table
2 - Master Detail Table

I have add one ID field in Master table (auto incremented)
Can I add ID filed in Master Details Table (auto incremented)
if i add in details table.. is it Advisable for database point of view.


thanks

asm

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-05-20 : 02:30:07
Sorry but it is not clear what you want to know.


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

asm
Posting Yak Master

140 Posts

Posted - 2010-05-20 : 05:38:54
Let me clear the point...

Table : BankVoucher
field: 1. ID - auto incremented
2. BCode -- Primary Key
3. BankCode
4. Amount
5. Narration

BankVoucherDetails
1. BCode -- Foreign Key
2. LedgerCode
3. Amount


In BankVoucher Table we store the master data.. mainly bank information
And in BankVoucherDetails we store the details data related to BankVoucher.

I want to know that can we add one ID filed in Bankvoucherdetails table


Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-05-20 : 05:52:09
Yes you can.


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

asm
Posting Yak Master

140 Posts

Posted - 2010-05-20 : 06:15:32

BankVoucherDetails - Should be ..
1. ID -- auto incremented
2. BCode -- Foreign Key
3. LedgerCode
4. Amount


Can it is Advisable in database point of view.

Go to Top of Page
   

- Advertisement -