필터 지우기
필터 지우기

How to query and insert into mysql.

조회 수: 1 (최근 30일)
Donghui  Sun
Donghui Sun 2014년 3월 15일
According to my application, I need to copy some records from a table into another table in mysql. For example, I have two tables, t_imginfo and t_result. Both two tables have some structure.The primary key of t_imginfo is id. I want copy some records with specified .id into t_result. MY code is like
sqlquery = sprintf('insert into t_result (select * from t_imginfo where id = %d)',30);
curor = exec(conn, sqlquery);
curor = fetch(curor);
After the code is executed, nothing changed. What should I do to meet my requirement?

답변 (0개)

카테고리

Help CenterFile Exchange에서 Database Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by