A basic 3 table inner join in MySQL? -


I tried to search for a question like this, but many of them joined with more complex select clauses While my question is more simple and should be a fast reference to newbies on MySQL

Being used in Oracle SQL, I was trying to join three tables and wanted to delete like this:

 remove  to tbl_login, tbl_profile, images WHERE tbl_login.loginid = Tbl_profile.loginid and tbl_profile.loginid = Images.loginid and loginid = 'derek';   

MySQL is my attempt:

  Delete from tbl_profile, use images, tbl_login, tbl_profile, insert inner images, tbl_login, WHERE, tbl_profile.loginid = images. Loginid and images.loginid = tbl_login.loginid and loginid = 'derek'; I ran into PHPMyadmin's SQL section and he told me that login was unclear which I thought was funny because if I'm joining three tables, why would it be unclear? So I edited it and it was done as   

that it was removed from the tbl_login table on the right line, but it was terminated by my second Rows from the table What am I doing here?

I think your query should look something like this (differently note the insertion conditions defined ):

  Remove from tbl_profile, use images, tbl_login, tbl_profile include inner images at images.loginid = tbl_profile.loginid, join INNER tbl_login at tbl_login.loginid = tbl_profile.loginid WHERE tbl_login .loginid = 'Derek';   

I think you want to delete rows from all the 3 tables. If you only want to remove from tbl_login, then in the previous reply it shows how to do this :)

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -