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

228
Views
MySQL cómo invertir dónde?

yo tengo una mesa asi

identificación sendero
1 /
2 /un/
3 /a/b/
4 /a B C/
5 /a B C D

Cuando uso una ruta (p. ej., ruta = '/a/b/c/') en la cláusula where , me gustaría recuperar los elementos secundarios de esta ruta.

p.ej:

ruta de identificación

identificación sendero
1 /
2 /un/
3 /a/b/
4 /a B C/

¿Cómo puedo conseguir esto?

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

Podrías usar la función instr

 SELECT * FROM mytable WHERE INSTR('/a/b/c', path) = 1
over 4 years ago · Santiago Trujillo Report

0

Creo que puedes usar LIKE para encontrar un hijo o un padre de la siguiente manera:

 -- select childs of /a/b/ select * from paths where path like ('/a/b/%'); -- select parents of /a/b/ select * from paths where '/a/b/' like concat(path,'%');

Pruebe SQL LIKE en línea

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!