i have a 50 tables
i want to find max key[PRIMARY KEY] start in a "10" in each table
i wanna show that table how to do ??
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Amitesh VermaPosted Aug 10, 2015, 4:05 AM
insert into #temp1 values(1000)
insert into #temp1 values(1001)
insert into #temp1 values(1002)
insert into #temp1 values(1003)
insert into #temp1 values(1004)
insert into #temp1 values(1005)
insert into #temp1 values(1006)
insert into #temp1 values(1007)
select MAX(sat1) from #temp1 where sat1 like '10%'
Nizam NizamPosted Aug 10, 2015, 3:19 AM
each tables have the primary key it's incrimenting 1,2,3,4,5,6,7,8,9,10 like that
but i wanna show , wich tables have the max key starts "10" at last in the column,
tbl_Name.. 1,2,3,4,5.6.7.8.9.10.11
tbl_Place 1,2,3..............................1000,1001
the above example both tables have the 10 value , but i wanna show the table which is last value in "10"
like the tbl_place that is what i wanna show how to do it????
Amitesh VermaPosted Aug 10, 2015, 2:58 AM