Hi everyone those give a helping hand Im a newbie and still learning the mysql scripting, here is my question. I need to update the live database from standalone which I have restore together with live database. where I need to use the data in all the same column to my live database column. example : backup database = a live database = b table consist of : itemcode, itemdesc, unit price, cost, selling I want the data from databse a column selling to be the exact same data on database b. Therefore both of the column will be the same, or by scpecify where clause. How am I write the script???
Assuming itemcode is the index, this is the SQL code you would use. BTW, this info is most likely readily available on google. UPDATE b,a SET b.itemdesc=a.itemdesc,b.unit price=a.unit price, b.cost=a.cost,b.selling=a.selling WHERE b.itemcode=a.itemcode;
THANK YOU VERY MUCH. YES YOUR RIGHT, IT DID READILY ON GOOGLE BUT THERE R SOME I DONT UNDERSTAND FULLY THE USAGE SINCE THIS IS MY FIRST TIME ENCOUNTER SQL SYNTAX. NOW I UNDERSTAND HOW TO USE FROM OTHER DATABASE AND UPDATE THE CURRENTLY. Now if I want to insert multiple row into current table from other database is it <insert into databaseA.table where databaseB.table = 'p9999'> does this query will insert new row into databaseA table taken from databaseB table with the info = to p9999??? Is there any way that update the data such as search for missing row and update/insert into the table???