- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
在 MySQL DB 中,我遇到一个问题。
Table1 : Name1 - Name2;
Table2: User;
Select ......
WHERE Table1.(Name1, ” ”, Name2) = Table2.User;
任何帮助如何将表 Name1 到表 Name2 连接成一个,然后使等于用户,因为我收到错误。
最佳答案
使用CONCAT
函数。
SELECT ...
FROM Table1 t1
JOIN Table2 t2 ON CONCAT(t1.Name1, ' ', t1.Name2) = t2.User
关于MySQLWhere条件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19838148/
我有一个这样的表: +-------------+-------------------+----------------+ |id | column1 | c
从全局 WHERE (type=3) AND WHERE (id BETWEEN 3 和 7) 中选择名称、地址;语法问题。但想法是只从类型 3 列中获取 3 到 7 之间的行。 我删除了 () 之一
首先,我意识到还有其他类似的问题,我已经阅读了其中很多问题,但我无法弄清楚。 我有三个这样的表。 urilist ---------------- rowid | uri 1000 xyz
这个问题已经有答案了: how to trim leading zeros from alphanumeric text in mysql function (8 个回答) 已关闭 5 年前。 MyS
我试图根据与插入对象的匹配从数据库中选择行,但在 WHERE 子句中,我需要条件仅适用于该列值不为空的情况。因此,基本上仅当比较表中的列不为空时,才将列与插入行中的列进行比较。我希望我解释得足够清楚,
我的情况:我的网站将在 Cookie 中查找“记住我” token 和用户 ID。如果 cookie 存在,它将对其进行反哈希处理并查找用户 ID 并比较 token 。带有“WHERE userid
我是一名优秀的程序员,十分优秀!