Thanks,
That worked. Also I tried the same without inner query, just by refering to routeprefix table as two tables with different aliases. Even that worked, the query I used is ..
select r1.route as cfrom, r2.route as cto
from activity_log a, routeprefix r1, routeprefix r2
where...
Hi,
I got these two tables in the database. Now I want the output from activity_log. The cfrom and cto refer to routeid in 'routeprefix' table. If I want to view the names of the routes instead of their IDs in the activity table, how should I frame my SQL statement ?
mysql> select * from...
Hi,
I want to know how to exctract the rows that best match the given string.
Eg: My String is 'harrypotter', and in the table, I have got the following values
select names from students;
Names
------------
harry
harrypot
someoneelse
harest
harryp
Among them, I would like to extract...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.