0

i had a table with muliple rows and colums . i need a sql query to fetch the data with some text . i know the row number , but i dont the column name or column number . then how to write the sql for this

vamsi reddy
  • 143
  • 10
  • select * from tablename where rownumber = 123, to get all columns. – jarlh Apr 23 '20 at 08:09
  • i need get the data only if the text matches – vamsi reddy Apr 23 '20 at 08:12
  • Show us some sample table data and the expected result - all as formatted text, not images. ([mcve] is worth reading.) – jarlh Apr 23 '20 at 08:13
  • BTW, are you using MySQL or Oracle? – jarlh Apr 23 '20 at 08:14
  • columns don't have numbers, they have names. How is it you don't know the column name? Knowing the names of tables and their columns is pretty fundamental to writing queries. And I'm suspicious of your "knowing" a row number. Rows don't really have numbers because they don't have any inherent ordering. Row number is assigned to a row _as it is fetched_. If you want rows in a particular order you _must_ use the ORDER BY clause in your query, and only in that specific result set will 'row number' have any meaning. – EdStevens Apr 23 '20 at 12:26

0 Answers0