Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6087427
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:52:09+00:00 2026-05-23T11:52:09+00:00

The MySQL query should return 1) TRUE along with Comma(,) separated list of STATION_NAME

  • 0

The MySQL query should return

1) TRUE along with Comma(,) separated list of STATION_NAME from a table STATION WHERE STATION_NAME is LIKE the INPUT specified buy the user.

FOR Ex:

INPUT = A, OUTPUT= (Agra,Ajmer,Amritsar,Ambala).

INPUT = AM, OUTPUT= (Amritsar, Ambala)

2) FALSE, when no such station exists

3) ERROR.

Detailed PROCEDURE will be appreciated, as I am new to MySQL.
Thanks in advance.. 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T11:52:09+00:00Added an answer on May 23, 2026 at 11:52 am

    You don’t need a procedure, just a select that returns one row on success or no rows on failure:

    select group_concat(station_name) from station where station_name like ?
    

    where ? is a placeholder for the user entered search.

    group_concat is a mysql-specific feature.

    If you must use a procedure, it would be something like this:

    create procedure stationsearch (in likewhat varchar(255), out rslt text)
    begin
        select group_concat(distinct station_name order by station_name) into rslt from station where station_name like likewhat;
    end
    

    Used like this:

    call stationsearch('Am%',@rslt);
    select @rslt;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i've a MySQL query that should return some rows that have the letters Ö
I have the below MySQL query, which should return the t1.username , t1.website ,
What query should I execute in MySQL database to get a result containing partial
I'm running Mysql 5.0.77 and I'm pretty sure this query should work? SELECT *
Mysql query returns result like this collector amount name 1 0.00 gihan 1 2000.00
this is the mysql query SELECT * FROM users AS up JOIN users AS
I have the following mysql query, which is producing a list of entries by
Mysql query question How to count as 1 if is 1,2 or 5 for
MySQL Query works fine using MySQL workbench but produces an error when I am
I have the following mysql query. Could you please tell me how to write

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.