gpt4 book ai didi

mysql - 无法在 mysql 表中使用电子邮件 ID 进行查询

转载 作者:行者123 更新时间:2023-11-28 23:34:25 25 4
gpt4 key购买 nike

我正在使用下面的表结构

Create table SP_Rest_User
(
Client_Id varchar(50) references SP_Rest_API_Key(Client_ID) ,
User_Id varchar(255) primary key ,
password_hash varchar(255),
is_user_active TINYINT(1),
Role varchar(50),
contact_id varchar(50) references sp_rest_contact(contact_id),Entity_Id varchar(50),
last_login_date_time datetime,
emailid varchar(100) collate armscii8_general_ci
);

我已经添加了以下记录

insert into SP_Rest_User values('C00001','VINOTH','06a085d63dae33a9',1,0,'1234','1111',now(),'vinoth.m@gmail.com');
insert into SP_Rest_User values('C00002','SENTHIL','06a085d63dae33a9',1,0,'1234','1111',now(),'senthil.c@yahoo.com');
insert into SP_Rest_User values('C00002','VENKAT','06a085d63dae33a9',1,0,'1234','1111',now(),'venkat.y@gmail.com');

不要使用电子邮件 ID 列查询记录。由于找不到记录而出错。

SELECT * FROM sp_rest_user where emailid like 'venkat.y@gmail.com';

最佳答案

使用:

SELECT * FROM SP_Rest_User where emailid like 'venkat.y@gmail.com';

使用 SP_Rest_User

In MySQL, databases correspond to directories within the data directory. Each table within a database corresponds to at least one file within the database directory (and possibly more, depending on the storage engine). Triggers also correspond to files. Consequently, the case sensitivity of the underlying operating system plays a part in the case sensitivity of database, table, and trigger names. This means such names are not case sensitive in Windows, but are case sensitive in most varieties of Unix. One notable exception is OS X, which is Unix-based but uses a default file system type (HFS+) that is not case sensitive. However, OS X also supports UFS volumes, which are case sensitive just as on any Unix.

http://dev.mysql.com/doc/refman/5.7/en/identifier-case-sensitivity.html

关于mysql - 无法在 mysql 表中使用电子邮件 ID 进行查询,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36221833/

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