Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select count(*) as has_relations
- -- здесь нужно заменить user_object на свою таблицу.
- from user_object as tbl
- where exists (
- select null
- from (select id, username, count(username) as count from j25_users group by username) as sub
- where sub.count > 1
- -- а здесь, если нужно, заменить название поля с ссылкой на id пользователя.
- and tbl.UserID = sub.id
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement