Q: How can I union columns of a table I have a table which has sql queries in one column for each row. I want to add these sql queries with union all. How can I add them ? 
For example:
there is one row that has 
 select * from students

and the other row has  
 select * from schools

I need:
(select * from students) union all (select * from schools)

I have table like below, and I want to union sqlStrring column.

thank you.

A: Select sqlString from students UNION ALL Select sqlString from Schools
A union must have the same columns of the same type to work.  Since schools and students don't likely have the same columns of the same type, you must be precise in the desired columns.  * simply will not work unless the table structures are identical.

A: select * from ( 
    select something as one_column from students 
    union all 
    select something_else as one_column from schools
)


A: If by "union" you mean have all columns from students and all columns from schools in one query, then it depends in if and how students and schools are related.  If they aren't and you just need the columns together without lining up any rows then you could do:
SELECT * FROM Students st
FULL OUTER JOIN Schools sc
   ON 1 = 0  // do not match any rows

or if there is a foriegn key to connect the two tables then you'd do something like:
SELECT * FROM Students st
FULL OUTER JOIN Schools sc  // or INNER JOIN, or LEFT JOIN, whichever is appropriate
   ON st.SchoolID = sc.SchoolID  // join by SchoolID

