I have a database with a column (col1) containing BIGINTs. On one of the rows I have the number 12345678901234567 and on another 98765432104567895. If I try to get this number as int64 into MATLAB however I loose precision:
>> setdbprefs('DataReturnFormat','cellarray');>> conn = database('myDatabase','myUser','myPassword');>> res = exec(conn,'SELECT col1 FROM myTable');>> res = fetch(res);>> data = res.data;>> int64(res.data{1})ans = 12345678901234568 >> int64(res.data{2}) ans = 98765432104567888
Best Answer