Updating columns values from another table SQL

user3236289

I want to update my table from another table in another database.I have two table that has two same columns.There are ID and iexp column.What i want is update every row from k_monster table to my database's k_monster table but there are other columns such as iHP iMP so i want to just update iExp column.what do you suggest?

M.Ali

Assuming Target_Database is the database where the table is that you want to update and Source_Database is the database where the table is you are using to update from.

Your query should look something like this.....

USE [Target_Database]
GO

UPDATE t
 SET t.iexp  = S.iexp 
FROM K_monster t 
INNER JOIN [Source_Database].[Schema].[K_monster] S 
ON t.ID = S.ID
GO

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

SQL to copy values from one table to another

From Java

SQL/MS Access: Adding a automatically updating field in SQL table with sum of values from another table

From Dev

Update multiple columns of a table using aggregate values from another table

From Dev

SQL - Update table values from values in another table

From Dev

SQL code for updating a column where the WHERE condition is from another table

From Dev

Updating a table from another table with multiple columns in sqlalchemy

From Dev

Sort SQL table with values from another table

From Dev

updating values of a table from another table through a join changes all values to 1 single value

From Dev

SQL-Server: Updating table from another table

From Dev

How to extract multiple rows from a table based on values from multiple columns from another table and then concatenate in SQL?

From Dev

SQL Query For Values From Another Table

From Dev

Update multiple columns of a table using aggregate values from another table

From Dev

Updating table based on the interval from another. SQL Server

From Dev

SQL - Updating table with informaton from another table

From Dev

Merging two columns with values from another table

From Dev

SQL server : Inserting/updating missing data from one table to another

From Dev

SQL code for updating a column where the WHERE condition is from another table

From Dev

Updating table in php MYSQL with Values from another table

From Dev

Populate a column in SQL with values from another table

From Dev

SQL: copy data from one table to another while adding additional columns of fixed values

From Dev

Updating single specified values from another table in SQLite

From Dev

SQL SELECT - Return new columns populated with values from another table

From Dev

SQL-Server: Updating table from another table

From Dev

Updating the same column from different columns of another table

From Dev

Updating values in ms-access table with values from another table

From Dev

SQL, choosing maximum values from another table

From Dev

SQL Query to compare two columns with one column from another table (and get two values)

From Dev

SQL - Updating rows with individual rows from another table

From Dev

Java updating Table view cell values from another class

Related Related

  1. 1

    SQL to copy values from one table to another

  2. 2

    SQL/MS Access: Adding a automatically updating field in SQL table with sum of values from another table

  3. 3

    Update multiple columns of a table using aggregate values from another table

  4. 4

    SQL - Update table values from values in another table

  5. 5

    SQL code for updating a column where the WHERE condition is from another table

  6. 6

    Updating a table from another table with multiple columns in sqlalchemy

  7. 7

    Sort SQL table with values from another table

  8. 8

    updating values of a table from another table through a join changes all values to 1 single value

  9. 9

    SQL-Server: Updating table from another table

  10. 10

    How to extract multiple rows from a table based on values from multiple columns from another table and then concatenate in SQL?

  11. 11

    SQL Query For Values From Another Table

  12. 12

    Update multiple columns of a table using aggregate values from another table

  13. 13

    Updating table based on the interval from another. SQL Server

  14. 14

    SQL - Updating table with informaton from another table

  15. 15

    Merging two columns with values from another table

  16. 16

    SQL server : Inserting/updating missing data from one table to another

  17. 17

    SQL code for updating a column where the WHERE condition is from another table

  18. 18

    Updating table in php MYSQL with Values from another table

  19. 19

    Populate a column in SQL with values from another table

  20. 20

    SQL: copy data from one table to another while adding additional columns of fixed values

  21. 21

    Updating single specified values from another table in SQLite

  22. 22

    SQL SELECT - Return new columns populated with values from another table

  23. 23

    SQL-Server: Updating table from another table

  24. 24

    Updating the same column from different columns of another table

  25. 25

    Updating values in ms-access table with values from another table

  26. 26

    SQL, choosing maximum values from another table

  27. 27

    SQL Query to compare two columns with one column from another table (and get two values)

  28. 28

    SQL - Updating rows with individual rows from another table

  29. 29

    Java updating Table view cell values from another class

HotTag

Archive