gpt4 book ai didi

mysql 简单的 where 子句不起作用?

转载 作者:行者123 更新时间:2023-11-29 07:59:11 25 4
gpt4 key购买 nike

Database changed

mysql> select * from userinfo;
+-----------+----------+-----------------------+------------+
| firstname | lastname | username | password |
+-----------+----------+-----------------------+------------+
| asif | kolu | ashufound | 123456 |
| faisal | samad | tfhgfhgfh@gmail.com | 123456 |
| kamran | shafat | kamthemaam | kamoos |
| ubaid | mir | sadfsfsff@yahoo.com | qwertasd |
| majid | mir | zsffsa | afdfdsf |
+-----------+----------+-----------------------+------------+
5 rows in set (0.00 sec)

mysql> SELECT * from userinfo WHERE lastname = 'mir';
Empty set (0.10 sec)

mysql> SELECT * from userinfo WHERE lastname='mir';
Empty set (0.00 sec)

这段代码有什么问题,简单的where子句不起作用?实际上问题出在我认为的插入代码中

最佳答案

您表格中的姓氏在 mir 前后可能有空格

   mir
^---^---look and remove spaces from here in your table

关于mysql 简单的 where 子句不起作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24345482/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com