Percentage sign in MySql

Why don't you try it yourself and see? At any rate, here are the docs you were looking for:

With LIKE you can use the following two wildcard characters in the pattern.

Character | Description
----------+-------------------------------------------------------
    %     | Matches any number of characters, even zero characters
    _     | Matches exactly one character

http://dev.mysql.com/doc/refman/5.6/en/string-comparison-functions.html#operator_like


Have a look at the following demo to explain

SQL Fiddle DEMO

CREATE TABLE Table1(
  ID INT AUTO_INCREMENT,
  Val VARCHAR(50),
     PRIMARY KEY (id)
  );
INSERT INTO Table1 (Val) SELECT 'TEST';
INSERT INTO Table1 (Val) SELECT '';

SELECT *
FROM Table1
WHERE Val LIKE '%'

Also from 12.5.1. String Comparison Functions

% Matches any number of characters, even zero characters

Such an old question w/o answer, but apparently in a context of creating a procedure % stands for any hosts.

i.e.:

CREATE DEFINER=`root`@`%` PROCEDURE `*internalProcedureName*`
  • % wildcard for the HOST stands for any hosts

Ref.:

  • MySQL 8.0 Create Procedure - while it does not clarify % itself but procedure only

Tags:

Mysql