%% Create Table Using MATLAB® Interface to SQLite
% Using the MATLAB® Interface to SQLite, create a table in a new SQLite database file.
% Create the SQLite connection conn to the new SQLite database file tutorial.db. Specify the file name in the current folder.

dbfile = fullfile(pwd,'tutorial.db');

conn = sqlite(dbfile,'create');

% Create the table inventoryTable using exec.
%

createInventoryTable = ['create table inventoryTable ' ...
    '(productNumber NUMERIC, Quantity NUMERIC, ' ...
    'Price NUMERIC, inventoryDate VARCHAR)'];

exec(conn,createInventoryTable)

% inventoryTable is an empty table in tutorial.db.
% To insert data into the database file, use the docid:database_ug.bub692r function.
% Close the SQLite connection.
%

close(conn)