2016-07-25 4 views

답변

1

sqlite를 쿼리 할 수 ​​있습니다 : PRAGMA table_info(name_of_your_table);. 모든 컬럼에 대한 정보를 제공합니다.

예 : 출력 열 이름을 위해, 그것에 따라 약간 다르다

% Assuming your JDBC driver is already added to your java path 

% create connection to database file 
conn = database('', '', '', 'org.sqlite.JDBC', 'jdbc:sqlite:C:\your_db.sqlite'); 

cursor = exec(conn, 'PRAGMA table_info(name_of_your_table);'); 
cursor = fetch(cursor); 

사용 DataReturnFormat (Matlab Documentation)

  • Cellarray (기본)
% When DataReturnFormat is cellarray 
cursor.Data(:,2) % returns table column names 
  • 테이블, 데이터 세트 또는 구조체
관련 문제