Update Mysql table using mym

2 ビュー (過去 30 日間)
Furqan Hashim
Furqan Hashim 2020 年 8 月 20 日
編集済み: Piyush Kumar 2024 年 10 月 7 日
I am connected to a database using mym. I want to update row based on conditions the sql for that would be
update dbname.dbtable
set Name = 'A'
where Age = 20
What is the easiest most elegant way to do that on MATLAB? I want to update table in a MATLAB script where some calculations are being done.

回答 (1 件)

Piyush Kumar
Piyush Kumar 2024 年 10 月 7 日
編集済み: Piyush Kumar 2024 年 10 月 7 日
To update a MySQL table using mym in MATLAB, ensure you have the mym package installed and properly configured.
Check the file exchange link to get details on installation. The same link provides examples for connecting and querying the database.
To achieve the same, you can also use database and sqlupdate functions from the Database Toolbox. Please check the example scripts available in their documentation to get more details.

カテゴリ

Help Center および File ExchangeDatabase Toolbox についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by