How does mysql random N different pieces of data from two tables?

there are two existing text tables (some fields are different). If you want to random N pieces of non-duplicated data from these two article tables, how do you write the SQL statement?

Jun.06,2022


union  as 

select * from table order by rand () LIMIT N


Baidu can find the answer, why ask here?

Menu