Para reemplazar una cadena de texto por otra, sin necesidad de estar tupla a tupla: UPDATE `tabla` SET campo = REPLACE(campo,‘texto a buscar’,‘nuevo texto’); Y
Categoría: DataBase
MySql, SqlServer, SqLite
SUBSTR() function MySQL SUBSTR() returns the specified number of characters from a particular position of a given string. SUBSTR() is a synonym for SUBSTRING(). Syntax:
Add this to our init function to create the table as soon as our database is created. function init() { app.openDb(); app.createTable(); } We have
For review, you should have the following code in the the onDeviceReady function in www/js/index.js: var db = window.sqlitePlugin.openDatabase({name: «test.db»}); db.executeSql(«DROP TABLE IF EXISTS tt»); db.executeSql(«CREATE TABLE tt