10 questions
1
vote
2
answers
916
views
MySQL Query result Fetch Time is way beyond than Execution Time, how to Solve this?
I am using MySQL 8.0.27-18, with InnoDB as engine. I have a huge database, with few tables containing 100M+ rows in them. For example: TABLE_A with 110M and TABLE_B with 300M+ rows. Sometimes I had to ...
0
votes
1
answer
27
views
SQL Replace an ID # of a bottom row to a certain ID # - I and increment all the rest of the rows ID # with 1 starting with the row that carries this
How do I replace in SQL an ID # of a bottom row to a certain ID # - I, and increment all the rest of the rows ID # with 1 starting with the row that carries this ID # -I?
This is what I tried, and ...
0
votes
1
answer
5k
views
SQL code error (OFFSET 0 ROWS FETCH FIRST 10 ROWS ONLY)
I'm trying to determine an average temperature over one day, for home assistant. I have linked sensors to home assistant, which send data to phpmyadmin. I can't send the sensors separately via home ...
1
vote
0
answers
750
views
Row limiting clause - FETCH FIRST in SQL Developer tool
When i tried to execute this statement:
select salary,DEPARTMENT_ID from EMPLOYEES order by 1 fetch first 15 rows only;
I got an error as follows:
ORA-00933: SQL command not properly ended
I ...
2
votes
1
answer
12k
views
SQL FETCH, Cursors and RPG
I am not sure what is wrong with my code, I am trying to make a while loop that will fetch the next characters in the field (code) with a cursor that is declared in SQL. The goal is to get the next ...