I would like to ask Mysql different fields have different records to return, how to query if you want to put them together?

A table field has 3 records returned by separate query
B table field alone query has 8 records returned
currently these two tables have no primary key and foreign key
if you want to combine, how should the structure of the table be designed and how should the model be built

Jun.05,2022

select a as a1,b as a2 ,c as a3 from t1 where xx=xx
union 
select b1 as a1,b2 as a2 ,b3 as a3 from t1 where xx=xx

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e6f663-4601a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e6f663-4601a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?