How to insert fields between two different tables

Source: Internet
Author: User
How to associate the fields of two different tables with the inserted user table fields?

Id username password e-mail

Mibao table fields include:

Id e-mail q1 q2 q3

What I want to achieve is to make the e-mail fields of the user table and the security table consistent. how can this problem be achieved?
Is there anything else to improve when creating a table? Please kindly advise ~~~


My ultimate goal is to go to the password page after passing the email verification and enter the correct password to get the password.


Reply to discussion (solution)

You can consider using foreign keys, but there are too many constraints and you may not be able to manage them.
You can also consider using triggers.
Simply insert the user table and insert the mibao table immediately.

You can consider using foreign keys, but there are too many constraints and you may not be able to manage them.
You can also consider using triggers.
Simply insert the user table and insert the mibao table immediately.

How to implement it? Insert the email field into the user table and then the mibao table ..

At email registration, the user table and mibao table are inserted. your id should be userid. why isn't it in one table?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.