Home >Database >Mysql Tutorial >What is the symbol that represents all columns in sql
The symbol in sql that represents all columns is the % in the wildcard character. Wildcard characters can be used to replace any other character in a string to search for data in a table. Used with the LIKE operator in SQL.
The operating environment of this tutorial: windows7 system, mysql8 version, Dell G3 computer.
Wildcard characters can be used to replace any other characters in a string.
SQL Wildcards
In SQL, wildcards are used with the SQL LIKE operator.
SQL wildcards are used to search for data in a table.
In SQL, you can use the following wildcards:
Example:
mysql> SELECT * FROM Websites; +----+---------------+---------------------------+-------+---------+ | id | name | url | alexa | country | +----+---------------+---------------------------+-------+---------+ | 1 | Google | https://www.google.cm/ | 1 | USA | | 2 | 淘宝 | https://www.taobao.com/ | 13 | CN | | 3 | 菜鸟教程 | http://www.runoob.com/ | 5000 | USA | | 4 | 微博 | http://weibo.com/ | 20 | CN | | 5 | Facebook | https://www.facebook.com/ | 3 | USA | | 7 | stackoverflow | http://stackoverflow.com/ | 0 | IND | +----+---------------+---------------------------+-------+---------+
Use SQL % wildcards
Below The SQL statement selects all websites whose URL starts with the letters "https":
SELECT * FROM Websites WHERE url LIKE 'https%';
Execution output result:
Related recommendations: "mysql tutorial 》
The above is the detailed content of What is the symbol that represents all columns in sql. For more information, please follow other related articles on the PHP Chinese website!