Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

How to define the type of variables that will be exported to SQL in Matlab

조회 수: 4 (최근 30일)
Yogan Sganzerla
Yogan Sganzerla 2020년 10월 29일
마감: MATLAB Answer Bot 2021년 8월 20일
Dear all,
I have a matlab code (following attached) that creates a table in SQL.
The code runs perfectly, but my problem is the way it is saved in SQL. As you can see in the photo below, in the id Column, I was expecting to be just real numbers( ex ID = [1;2;3;4;...] and it is the same with the other variavles. Each of them has one specific type that I wish to be able to setup in MATLAB and not in SQL.
It is possible? how to do that?
Thank you for your attention.

답변 (1개)

Suresh Siripuram
Suresh Siripuram 2020년 12월 2일
Hi Yogan,
It is possible to do specify the column type while writing to SQL by adding a parameter ‘columnType’ and provide the data type for all columns in the database table with sqlwrite command.
For more information please check the documentation here.
Thank you,
Suresh

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by