Check the following thread to connect to a database and read values from it.
https://www.edureka.co/community/58298/how-to-connect-to-a-database-from-uipath-and-read-data-from-it
Using the same procedure connect to the database to which you want to write the data and then use execute non query activity give the connection name and then in the query give as "INSERT into database name(column name to which you want to insert it) value".
Hope this helps!