次の方法で共有


SQLiteDatabase.Delete(String, String, String[]) Method

Definition

Convenience method for deleting rows in the database.

[Android.Runtime.Register("delete", "(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;)I", "GetDelete_Ljava_lang_String_Ljava_lang_String_arrayLjava_lang_String_Handler")]
public virtual int Delete (string? table, string? whereClause, string[]? whereArgs);
[Android.Runtime.Register("delete", "(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;)I", "GetDelete_Ljava_lang_String_Ljava_lang_String_arrayLjava_lang_String_Handler")]
public virtual int Delete (string table, string? whereClause, string[]? whereArgs);
[<Android.Runtime.Register("delete", "(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;)I", "GetDelete_Ljava_lang_String_Ljava_lang_String_arrayLjava_lang_String_Handler")>]
abstract member Delete : string * string * string[] -> int
override this.Delete : string * string * string[] -> int

Parameters

table
String

the table to delete from

whereClause
String

the optional WHERE clause to apply when deleting. Passing null will delete all rows.

whereArgs
String[]

You may include ?s in the where clause, which will be replaced by the values from whereArgs. The values will be bound as Strings. If whereClause is null or does not contain ?s then whereArgs may be null.

Returns

the number of rows affected if a whereClause is passed in, 0 otherwise. To remove all rows and get a count pass "1" as the whereClause.

Attributes

Remarks

Convenience method for deleting rows in the database.

Java documentation for android.database.sqlite.SQLiteDatabase.delete(java.lang.String, java.lang.String, java.lang.String[]).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to