Get data from multiple databases at once I need to UNION data from tables with the same name in multiple databases. All databases have the same prefix: CDNXL_(NAME OF DB)

How would I execute this query against more than one database at at time?

SELECT 
    prac_id, 
    prac_name, 
    prace_surname, 
    prac_IDcard, 
    prac_workplace
From prac_nag.CDNXL_ (NAME OF DB) 
where prac_IDcard = @parameter 


Can this be done with  'IF' or 'WHILE'?

-- Edit
Now I can see my mistake.

I have got 46 Databases with prefix CDNXL_ but one is DB with CDNXL_Configuration, and doesn't have got table was I wanna. How can I skip/ignore this DB?
One of the methods you can try is sp_msforeachdb. Making some assumptions about your datatypes in the @table below...

declare @results table (
    prac_id int, 
    prac_name nvarchar(100), 
    prace_surname nvarchar(100), 
    prac_IDcard nvarchar(100), 
    prac_workplace nvarchar(100)
);

insert @results
exec sp_msforeachdb N'
use [?]

if left(''?'',6) = ''CDNXL_'' -- only execute the query against databases 
                              -- that match the naming pattern
    and ''?'' &lt;&gt; ''CDNXL_Configuration''
begin
    select
        prac_id, 
        prac_name, 
        prace_surname, 
        prac_IDcard, 
        prac_workplace
    from prac_nag.[?]
    where prac_IDcard = @parameter; 
end;
';

select * from @results;