I have 3 tables:
hosts (host_id, name, address, template_id);
hostgroup (hostgroup_id, name);
hosts_hostgroup (a, b);
The first table keeps all the hosts, the second one all the groups and the last one says which group belong each host.
Note that hosts_hostgroup has two different column names a and b.
Which is the Query to give me the hosts that belong to some group?
1 Answer