CopyPastor

Detecting plagiarism made easy.

Score: 0.8712024688720703; Reported for: String similarity Open both answers

Possible Plagiarism

Plagiarized on 2018-10-06
by Milad Bahmanabadi

Original Post

Original - Posted on 2016-07-30
by Tim Biegeleisen



            
Present in both answers; Present only in the new answer; Present only in the old answer;

**Use DROP TABLE:**
// query to obtain the names of all tables in your database Cursor c = db.rawQuery("SELECT name FROM sqlite_master WHERE type='table'", null); List<String> tables = new ArrayList<>(); // iterate over the result set, adding every table name to a list while (c.moveToNext()) { tables.add(c.getString(0)); } // call DROP TABLE on every table name for (String table : tables) { String dropQuery = "DROP TABLE IF EXISTS " + table; db.execSQL(dropQuery); }
Hope it will help you
Use `DROP TABLE`:
<!-- language: java -->
// query to obtain the names of all tables in your database Cursor c = db.rawQuery("SELECT name FROM sqlite_master WHERE type='table'", null); List<String> tables = new ArrayList<>();
// iterate over the result set, adding every table name to a list while (c.moveToNext()) { tables.add(c.getString(0)); }
// call DROP TABLE on every table name for (String table : tables) { String dropQuery = "DROP TABLE IF EXISTS " + table; db.execSQL(dropQuery); }

        
Present in both answers; Present only in the new answer; Present only in the old answer;