I am trying to insert into table A where one of it's value need to be selected from table B. I used the below query.
INSERT INTO `TableA` (`TableACol1`,`TableACol2`) VALUES ( 4, SELECT `TableBcol1` FROM `TableB` WHERE FirstName="shasha" )
I don't know what's going wrong with this but facing this error.
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax