TheDeveloperBlog.com

Home | Contact Us

C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML

SQLite Delete Query

SQLite Delete Query with history, features, advantages, installation, commands, syntax, datatypes, operators, expressions, databases, table, crud operations, clauses, like, glob, limit, and clause, advance sqlite

<< Back to SQLITE

SQLite DELETE Query

In SQLite, DELETE query is used to delete the existing records from a table. You can use it with WHERE clause or without WHERE clause. WHERE clause is used to delete the specific records (selected rows), otherwise all the records would be deleted.

Syntax:

DELETE FROM table_name
WHERE [conditions....................];;

Note: We can use N number of "AND" or "OR" operators with "WHERE" clause.

Example:

We have an existing table named "STUDENT", having the following data:

Sqlite Delete query 1

Example1:

Delete the records of a student from "STUDENT" table where ID is 4.

DELETE FROM STUDENT WHERE ID = 4; 
Sqlite Delete query 2

The student's record of id 4 is deleted; you can check it by using SELECT statement:

SELECT * FROM STUDENT;

Output:

Sqlite Delete query 3

Example2:

If you want to delete all records from the table, don't use WHERE clause.

DELETE FROM STUDENT; 
Sqlite Delete query 4

You can see that there is no data in the table "STUDENT".






Related Links:


Related Links

Adjectives Ado Ai Android Angular Antonyms Apache Articles Asp Autocad Automata Aws Azure Basic Binary Bitcoin Blockchain C Cassandra Change Coa Computer Control Cpp Create Creating C-Sharp Cyber Daa Data Dbms Deletion Devops Difference Discrete Es6 Ethical Examples Features Firebase Flutter Fs Git Go Hbase History Hive Hiveql How Html Idioms Insertion Installing Ios Java Joomla Js Kafka Kali Laravel Logical Machine Matlab Matrix Mongodb Mysql One Opencv Oracle Ordering Os Pandas Php Pig Pl Postgresql Powershell Prepositions Program Python React Ruby Scala Selecting Selenium Sentence Seo Sharepoint Software Spellings Spotting Spring Sql Sqlite Sqoop Svn Swift Synonyms Talend Testng Types Uml Unity Vbnet Verbal Webdriver What Wpf