
- Learn MySQL
- MySQL - Home
- MySQL - Introduction
- MySQL - Installation
- MySQL - Administration
- MySQL - PHP Syntax
- MySQL - Connection
- MySQL - Create Database
- MySQL - Drop Database
- MySQL - Select Database
- MySQL - Data Types
- MySQL - Create Tables
- MySQL - Drop Tables
- MySQL - Insert Query
- MySQL - Select Query
- MySQL - Where Clause
- MySQL - Update Query
- MySQL - Delete Query
- MySQL - Like Clause
- MySQL - Sorting Results
- MySQL - Using Join
- MySQL - NULL Values
- MySQL - Regexps
- MySQL - Transactions
- MySQL - Alter Command
- MySQL - Indexes
- MySQL - Temporary Tables
- MySQL - Clone Tables
- MySQL - Database Info
- MySQL - Using Sequences
- MySQL - Handling Duplicates
- MySQL - SQL Injection
- MySQL - Database Export
- MySQL - Database Import
How to delete '' entry in MySQL?
You can use delete command −
delete from yourTableName where yourColumnName='\\';
Let us first create a table −
mysql> create table DemoTable ( FolderName varchar(100) ); Query OK, 0 rows affected (0.67 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable values("????"); Query OK, 1 row affected (0.44 sec) mysql> insert into DemoTable values("\\"); Query OK, 1 row affected (0.13 sec)
Display all records from the table using select statement −
mysql> select *from DemoTable;
Output
+------------+ | FolderName | +------------+ | ???? | | \ | +------------+ 2 rows in set (0.00 sec)
Here is the query to delete '\' entry in MySQL −
mysql> delete from DemoTable where FolderName='\\'; Query OK, 1 row affected (0.63 sec)
Let us check the record from the table −
mysql> select *from DemoTable;
Output
+------------+ | FolderName | +------------+ | ???? | +------------+ 1 row in set (0.00 sec)
- Related Articles
- How to prevent MySQL double insert (duplicate entry)?
- How to delete all rows except some in MySQL?
- Get Last Entry in a MySQL table?
- How to delete a column from a table in MySQL?
- How to delete data in a MySQL database with Java?
- How to delete rows older than 14 days in MySQL?
- MySQL query to delete row
- Selecting random entry from MySQL Database?
- Ordering alphabetically in MySQL except for one entry?
- SELECT last entry without using LIMIT in MySQL?
- How do I delete blank rows in MySQL?
- How to delete all the duplicate records in a MySQL table?
- How can I delete MySQL temporary table?
- Updating last entry of a particular ID in MySQL
- How to delete last record (on condition) from a table in MySQL?

Advertisements