zhibo/check_users.sql

32 lines
886 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- =====================================================
-- 查询现有用户
-- =====================================================
-- 1. 查看所有用户前50条
SELECT uid, nickname, phone, sex, birthday, addres, mark, status
FROM eb_user
ORDER BY uid DESC
LIMIT 50;
-- 2. 按昵称模糊搜索测试用户
SELECT uid, nickname, phone, sex, birthday, addres
FROM eb_user
WHERE nickname LIKE '%张%'
OR nickname LIKE '%林%'
OR nickname LIKE '%江%'
OR nickname LIKE '%刘%'
OR nickname LIKE '%阮%'
OR nickname LIKE '%夏%'
OR nickname LIKE '%吉%'
OR nickname LIKE '%李%'
OR nickname LIKE '%黄%'
OR nickname LIKE '%谢%'
OR nickname LIKE '%傅%'
OR nickname LIKE '%洪%'
OR nickname LIKE '%荣%'
OR nickname LIKE '%吕%'
OR nickname LIKE '%方%';
-- 3. 查看用户总数
SELECT COUNT(*) as total_users FROM eb_user;