Hai, Good Evening Dudes,
I need to store phone numbers in DB like this,
I have one Emp table in that i have to store mobile numbers ,like this
Emp Tab:
-----------------
EmpId EmpName EmpPhoneNum
1 Siva 9123456789
Suppose one Employee have 2 or more mobile numbers means how to store it ? ? ?
EmpId EmpName EmpPhoneNum
1 Siva 9123456789,9212345678,............
like this and same time i want to update nums and also i want to delete particular number only...
Thanks In Advance :)
Loading

Kiresh GangariyaPosted Jun 17, 2013, 1:02 AM
you should go with Riyaz way and its good way to fullfill your scenario .
suren vPosted Jun 17, 2013, 12:13 AM
Ok Dude, Suppose i create a table for phone nums means ...
PhoneNum Tab:
--------------------
EmpId EmpNum1 Epnum2 Empnum3
1 Ph1 Ph2 Ph3
main thing i dono per person how many nums having suppose they have 2 , 3 , 4 r 5 ..... Like this
That time how we ll create a columns ? for this ? ? ?
Thanks For Reply :)
suren vPosted Jun 17, 2013, 12:03 AM
Yes i try this , add new columns into the Emp table? Like EmpPhoneNum1, EmpPhoneNum2, etc. And same time i dono how many mobile nums per person having ? like this 1 person having 3 nums means suppose another person having 5 that time how we ll create an columns ? ? ?
Thanks For Your Reply :)
Riyaz AkhtarPosted Jun 16, 2013, 2:08 PM
You create columns in same table if you know the max limit of phone numbers. Generally employee phone number can be either mobile number, work Phone, home Phone, alternative number.
But if you dont know the limit then I suggest you to create a new table to store employee's phone number, it will be easy to maintain the data future. Your new table will store data like below:
Table: [your new table]
EmployeeID PhoneNumber
101 3434343434
101 4324243244
Christopher LoydPosted Jun 16, 2013, 1:08 PM