I have table t1 in sql server and table t2.
t1 have id,status column and t2 have id and matchid 2 column.
t1 table we have 2 record
id status
1 active
1 inactive
and t2 table also have 2 record
id matchid
2 1
32 1
we want output like
1 32
in second table need to pick max id
raj rajPosted Jul 31, 2023, 7:56 AM
not require to use where active it depends on id max like 32 whether active or inactive
Amit MohantyPosted Jul 31, 2023, 7:01 AM
raj rajPosted Jul 31, 2023, 6:07 AM
we have one other column as well which have different value so group by we will get 2 rows
Tahir AnsariPosted Jul 31, 2023, 6:00 AM