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 ??
SQL QUERY STARTIGN KEY 10
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Amitesh VermaRank #2,535 · 552 reputationPosted Aug 9, 2015, 10:58 PM EDT
Nizam Nizam11 reputationPosted Aug 9, 2015, 11:19 PM EDT
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 VermaRank #2,535 · 552 reputationPosted Aug 10, 2015, 12:05 AM EDT
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%'