How can I combine the 2 queries below in order to have the result in the same table as 4 columns Table name, last create date, last update date and columns count?
select distinct
'abc.gcc_case' Table,
max(create_date) as Last_Create_Date,
max(update_date) as Last_Update_Date
from abc.gcc_case
select
count(*) as Columns_Count
from information_schema.columns
where Table_name = 'gcc_case'
I was trying to use a join but I am not sure what to use to give the result I was looking for.
2条答案
按热度按时间kkbh8khc1#
Here is an option
The distinct is redundant
jv4diomz2#
Something I noticed is that you want the output of these two queries to be in the a row
result: