mysql - Read each line from a result set and setting the value -


Contact me as user id (int), user_name (four) and column in table (t1) (four) is. I need to be repeated on the table to find out which user_name is present multiple times in the table and counting and if I use count to remove user_NA, then this event will be more than three times. Counting from username_name (*) & gt; 3 has tried to use the output user_name EXPR_1 Chris 4 Fred 5

 . 

Now if I need to use values ​​in EXPR_1 how to reinvise this result on the set without creating a new / temporary table.

as a sub-selection of your query Use:

  Delete T1 WHERE user_name IN (SELECT user_name FROM T1 GROUP BY user_name is getting COUNT (user_name)> 3)   

Feedback to the comment:

OK, now I'm confused as to what I'm asking for you. If you want to do so, according to the most counting, just do this:

  select user_name, COUNT (user_name) as user number by user group 1 user Name (user_name) & gt; DESC by 3 commands   

Now when you recycle them, then the number of events will be ordered from the highest to the least.

Are you asking how to recycle the result? If so, it is entirely dependent on this tool, which tool are you using to execute this query, and how are you sending it to your other application? Please expand on that.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -