If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > On Insert?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-09-08, 16:39
compsci compsci is offline
Registered User
 
Join Date: Jun 2007
Location: London
Posts: 117
On Insert?

Hello all,

I have a table called membersand another table called settings. Every time I add a new user to members is it possible to have the ID of that user added, be added to the settings table automatically?

I am hoping there is something equivalent to the "ON DELETE" and "ON UPDATE", is there a "ON INSERT"! (it seems fanicful)

Thanks all
Reply With Quote
  #2 (permalink)  
Old 08-09-08, 17:24
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,525
no, there isn't

this sounds like a one-to-one relationship -- any reason why you couldn't combine the tables? at least then you wouldn't be asking this question

__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 08-09-08, 17:38
compsci compsci is offline
Registered User
 
Join Date: Jun 2007
Location: London
Posts: 117
:P lol - Actually there is no reason not to combine them. I really have problems with db design. I like breaking things up even if they have one-to-one relationship!

Thanks for getting me to see the light r937
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On