sqlread specific columns/variables from a MySQL table
조회 수: 6 (최근 30일)
이전 댓글 표시
I want to import to Matlab one or a couple specific columns from a table that is stored in MySQL database. sqlread(conn, tablename) would import the whole table. I tried playing around with opts. it didn't work. Is there any way to make this work? Or should I try using sql query script? Thanks!
opts = databaseImportOptions(conn, tablename);
opts = setoptions(opts, 'SelectedVaraibleNames', {'wanted_column'}); % error message
댓글 수: 5
답변 (2개)
Walter Roberson
2025년 1월 18일
opts = setoptions(opts, 'SelectedVariableNames', {'wanted_column'});
You had 'SelectedVaraibleNames' instead of 'SelectedVariableNames'
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Database Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!