Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 MySQL 中有一行包含用户名和电子邮件地址等信息,我想根据用户名字段查找行的 id。关于如何根据用户名字段查找 id 的任何想法?
SELECT id FROM users WHERE username = 'NStorm';
这是非常基本的sql:
select id from your_table where username = 'foo'