Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

186
Views
seleccione todas las filas después de un uuid específico en postgresql

Quiero seleccionar todas las filas que comienzan después de un uuid específico, por ejemplo, aquí están los datos

 +--------------------------------------+-----------+------------+ | uuid | divisi_id | divisionid | +--------------------------------------+-----------+------------+ | b303a96b-2a03-4b5e-90a1-6b3631fc82af | BTT | 3 | | 8c4bf1b8-7477-42e4-affb-31bafa8648f1 | BTT | 3 | | 6639909d-74e1-4dec-a1f3-f70703c0b6c6 | BTT | 3 | | 1a1aa367-1467-4811-848d-694dbe98a5a8 | BTT | 3 | | e739b352-d952-4ec8-980e-a50180e18144 | BTT | 3 | +--------------------------------------+-----------+------------+

ahora, por ejemplo, tengo el último uuid = 8c4bf1b8-7477-42e4-affb-31bafa8648f1 (la segunda entrada). ¿Cómo seleccionar filas después de ese uuid? no tengo idea al respecto

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Prueba esto

 SELECT d1.* FROM (SELECT Row_Number() over (order by id) AS RowIndex, * from tableName ) AS d1 INNER JOIN (SELECT Row_Number() over (order by id) AS RowIndex, * from tableName) AS d2 ON (d2.uuid = '8c4bf1b8-7477-42e4-affb-31bafa8648f1' and d1.RowIndex > d2.RowIndex)

¡Espero que tengas la clave principal!

Si no tiene clave principal que

 SELECT d1.* FROM (SELECT Row_Number() over (order by (select null)) AS RowIndex, * from tableName) AS d1 INNER JOIN (SELECT Row_Number() over (order by (select null)) AS RowIndex, * from tableName) AS d2 ON (d2.uuid = '8c4bf1b8-7477-42e4-affb-31bafa8648f1' and d1.RowIndex > d2.RowIndex)
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!