execute(conn,sqlquery)
executes an SQL query that contains a non-SELECT SQL statement by using
the SQLite database connection with the MATLAB® interface to SQLite.
Using an SQLite database connection and the MATLAB® interface to SQLite, create and execute a non-SELECT SQL statement that creates a temporary view in the database and imports its contents.
Create an SQLite database connection to the SQLite database file tutorial.db.
dbfile = "tutorial.db";
conn = sqlite(dbfile);
Create an SQL statement that creates a temporary view named PRODUCTNAMES. The view selects all product names using the productDescription column of the productTable database table. Execute the CREATE SQL statement.
SQLite database connection, specified as an sqlite object created using the sqlite
function.
SQL statement, specified as a character vector or string scalar. The SQL statement
can be any valid non-SELECT SQL statement. For information about the
SQL query language, see the SQL
Tutorial.
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window.
Web browsers do not support MATLAB commands.
Website auswählen
Wählen Sie eine Website aus, um übersetzte Inhalte (sofern verfügbar) sowie lokale Veranstaltungen und Angebote anzuzeigen. Auf der Grundlage Ihres Standorts empfehlen wir Ihnen die folgende Auswahl: .
Sie können auch eine Website aus der folgenden Liste auswählen:
So erhalten Sie die bestmögliche Leistung auf der Website
Wählen Sie für die bestmögliche Website-Leistung die Website für China (auf Chinesisch oder Englisch). Andere landesspezifische Websites von MathWorks sind für Besuche von Ihrem Standort aus nicht optimiert.