Show row number of records in query result

How do I include a column of row numbers in a query result?
The query already exists and I assume I could add another column and associate it with the table I want the rows# from, then enter the appropriate SQL. How do I generate the row number column? Thx, Erik

Ask/Guide - How to use the Ask site - The Document Foundation Wiki? #Are_there_any_answers_to_my_question_yet?

Sorry, the suggestion is confusing and not understandable.

a row number is dependant on the queries ORDER BY clause and method of calculation is determined by the database you use, you have provided neither.
.
if you tell us the name of the database used
and
post a sample of your query in SQL format or better still upload a test database
then
it may be possible for someone to provide an answer.
.
fpy posted a link to the Ask Guide, follow the guide and save everyone the angst.

@fpy linked several threads, as you have not told, wich database you use… So we can not give a precise answer.
From the thread below we can see you are using HSQL-embedded, but this also tells you have to use a more complex way to create row-numbers.