SQL Select i dunno what exactly mean





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







-6















i have sql table like this



pets    playstart   endstart
cat 12:10 12:50
dog 13:10 13:50
lion 14:10 14:50


if i select 13:35
result dog
how create sql query for this command?










share|improve this question

























  • What data type in date column?

    – dwir182
    Nov 23 '18 at 7:37






  • 1





    Try to make your question title more closely reflect your actual question. "i dunno what exactly mean" isn't very useful for searching on.

    – Nick
    Nov 23 '18 at 7:38


















-6















i have sql table like this



pets    playstart   endstart
cat 12:10 12:50
dog 13:10 13:50
lion 14:10 14:50


if i select 13:35
result dog
how create sql query for this command?










share|improve this question

























  • What data type in date column?

    – dwir182
    Nov 23 '18 at 7:37






  • 1





    Try to make your question title more closely reflect your actual question. "i dunno what exactly mean" isn't very useful for searching on.

    – Nick
    Nov 23 '18 at 7:38














-6












-6








-6








i have sql table like this



pets    playstart   endstart
cat 12:10 12:50
dog 13:10 13:50
lion 14:10 14:50


if i select 13:35
result dog
how create sql query for this command?










share|improve this question
















i have sql table like this



pets    playstart   endstart
cat 12:10 12:50
dog 13:10 13:50
lion 14:10 14:50


if i select 13:35
result dog
how create sql query for this command?







mysql sql






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 23 '18 at 7:36









Chowkidar Madhur Bhaiya

19.9k62336




19.9k62336










asked Nov 23 '18 at 7:35









ErlinaErlina

31




31













  • What data type in date column?

    – dwir182
    Nov 23 '18 at 7:37






  • 1





    Try to make your question title more closely reflect your actual question. "i dunno what exactly mean" isn't very useful for searching on.

    – Nick
    Nov 23 '18 at 7:38



















  • What data type in date column?

    – dwir182
    Nov 23 '18 at 7:37






  • 1





    Try to make your question title more closely reflect your actual question. "i dunno what exactly mean" isn't very useful for searching on.

    – Nick
    Nov 23 '18 at 7:38

















What data type in date column?

– dwir182
Nov 23 '18 at 7:37





What data type in date column?

– dwir182
Nov 23 '18 at 7:37




1




1





Try to make your question title more closely reflect your actual question. "i dunno what exactly mean" isn't very useful for searching on.

– Nick
Nov 23 '18 at 7:38





Try to make your question title more closely reflect your actual question. "i dunno what exactly mean" isn't very useful for searching on.

– Nick
Nov 23 '18 at 7:38












2 Answers
2






active

oldest

votes


















0














In answer to the question. A select statement is a statement that aims at retrieving some data. SQL was invented to be a human readable way of interacting with databases. As such you can almost phrase your query as a question.



In this case your question would be "What pet would be played with at 13:35?".



Provided the table is guaranteed to have none-overlapping "playstart" and "playend" values this should work (I don't know what the name of your table is so I've used "yourtable" to represent that).



select pets from yourtable where playstart <='13:35' and playend >='13:35'





share|improve this answer
























  • thank you Dwight Reynoldson, i will try it

    – Erlina
    Nov 23 '18 at 7:51













  • Assuming the playstart and playend columns are time data type, you can also use the syntax SELECT pets FROM yourtable WHERE '13:35' between playstart and playend;

    – Jonathan Willcock
    Nov 23 '18 at 9:18













  • works great Dwight Reynoldson thank you

    – Erlina
    Nov 25 '18 at 6:19











  • Hi @Erlina can you please mark my answer as accepted if it has helped you out? Glad I could help.

    – Dwight Reynoldson
    Nov 25 '18 at 11:38



















0














Please try this one, I hope this will works for you



select pets from pets where playstart >= '13:10' and endstart <= '13:50'






share|improve this answer
























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53442420%2fsql-select-i-dunno-what-exactly-mean%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    In answer to the question. A select statement is a statement that aims at retrieving some data. SQL was invented to be a human readable way of interacting with databases. As such you can almost phrase your query as a question.



    In this case your question would be "What pet would be played with at 13:35?".



    Provided the table is guaranteed to have none-overlapping "playstart" and "playend" values this should work (I don't know what the name of your table is so I've used "yourtable" to represent that).



    select pets from yourtable where playstart <='13:35' and playend >='13:35'





    share|improve this answer
























    • thank you Dwight Reynoldson, i will try it

      – Erlina
      Nov 23 '18 at 7:51













    • Assuming the playstart and playend columns are time data type, you can also use the syntax SELECT pets FROM yourtable WHERE '13:35' between playstart and playend;

      – Jonathan Willcock
      Nov 23 '18 at 9:18













    • works great Dwight Reynoldson thank you

      – Erlina
      Nov 25 '18 at 6:19











    • Hi @Erlina can you please mark my answer as accepted if it has helped you out? Glad I could help.

      – Dwight Reynoldson
      Nov 25 '18 at 11:38
















    0














    In answer to the question. A select statement is a statement that aims at retrieving some data. SQL was invented to be a human readable way of interacting with databases. As such you can almost phrase your query as a question.



    In this case your question would be "What pet would be played with at 13:35?".



    Provided the table is guaranteed to have none-overlapping "playstart" and "playend" values this should work (I don't know what the name of your table is so I've used "yourtable" to represent that).



    select pets from yourtable where playstart <='13:35' and playend >='13:35'





    share|improve this answer
























    • thank you Dwight Reynoldson, i will try it

      – Erlina
      Nov 23 '18 at 7:51













    • Assuming the playstart and playend columns are time data type, you can also use the syntax SELECT pets FROM yourtable WHERE '13:35' between playstart and playend;

      – Jonathan Willcock
      Nov 23 '18 at 9:18













    • works great Dwight Reynoldson thank you

      – Erlina
      Nov 25 '18 at 6:19











    • Hi @Erlina can you please mark my answer as accepted if it has helped you out? Glad I could help.

      – Dwight Reynoldson
      Nov 25 '18 at 11:38














    0












    0








    0







    In answer to the question. A select statement is a statement that aims at retrieving some data. SQL was invented to be a human readable way of interacting with databases. As such you can almost phrase your query as a question.



    In this case your question would be "What pet would be played with at 13:35?".



    Provided the table is guaranteed to have none-overlapping "playstart" and "playend" values this should work (I don't know what the name of your table is so I've used "yourtable" to represent that).



    select pets from yourtable where playstart <='13:35' and playend >='13:35'





    share|improve this answer













    In answer to the question. A select statement is a statement that aims at retrieving some data. SQL was invented to be a human readable way of interacting with databases. As such you can almost phrase your query as a question.



    In this case your question would be "What pet would be played with at 13:35?".



    Provided the table is guaranteed to have none-overlapping "playstart" and "playend" values this should work (I don't know what the name of your table is so I've used "yourtable" to represent that).



    select pets from yourtable where playstart <='13:35' and playend >='13:35'






    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Nov 23 '18 at 7:45









    Dwight ReynoldsonDwight Reynoldson

    17428




    17428













    • thank you Dwight Reynoldson, i will try it

      – Erlina
      Nov 23 '18 at 7:51













    • Assuming the playstart and playend columns are time data type, you can also use the syntax SELECT pets FROM yourtable WHERE '13:35' between playstart and playend;

      – Jonathan Willcock
      Nov 23 '18 at 9:18













    • works great Dwight Reynoldson thank you

      – Erlina
      Nov 25 '18 at 6:19











    • Hi @Erlina can you please mark my answer as accepted if it has helped you out? Glad I could help.

      – Dwight Reynoldson
      Nov 25 '18 at 11:38



















    • thank you Dwight Reynoldson, i will try it

      – Erlina
      Nov 23 '18 at 7:51













    • Assuming the playstart and playend columns are time data type, you can also use the syntax SELECT pets FROM yourtable WHERE '13:35' between playstart and playend;

      – Jonathan Willcock
      Nov 23 '18 at 9:18













    • works great Dwight Reynoldson thank you

      – Erlina
      Nov 25 '18 at 6:19











    • Hi @Erlina can you please mark my answer as accepted if it has helped you out? Glad I could help.

      – Dwight Reynoldson
      Nov 25 '18 at 11:38

















    thank you Dwight Reynoldson, i will try it

    – Erlina
    Nov 23 '18 at 7:51







    thank you Dwight Reynoldson, i will try it

    – Erlina
    Nov 23 '18 at 7:51















    Assuming the playstart and playend columns are time data type, you can also use the syntax SELECT pets FROM yourtable WHERE '13:35' between playstart and playend;

    – Jonathan Willcock
    Nov 23 '18 at 9:18







    Assuming the playstart and playend columns are time data type, you can also use the syntax SELECT pets FROM yourtable WHERE '13:35' between playstart and playend;

    – Jonathan Willcock
    Nov 23 '18 at 9:18















    works great Dwight Reynoldson thank you

    – Erlina
    Nov 25 '18 at 6:19





    works great Dwight Reynoldson thank you

    – Erlina
    Nov 25 '18 at 6:19













    Hi @Erlina can you please mark my answer as accepted if it has helped you out? Glad I could help.

    – Dwight Reynoldson
    Nov 25 '18 at 11:38





    Hi @Erlina can you please mark my answer as accepted if it has helped you out? Glad I could help.

    – Dwight Reynoldson
    Nov 25 '18 at 11:38













    0














    Please try this one, I hope this will works for you



    select pets from pets where playstart >= '13:10' and endstart <= '13:50'






    share|improve this answer




























      0














      Please try this one, I hope this will works for you



      select pets from pets where playstart >= '13:10' and endstart <= '13:50'






      share|improve this answer


























        0












        0








        0







        Please try this one, I hope this will works for you



        select pets from pets where playstart >= '13:10' and endstart <= '13:50'






        share|improve this answer













        Please try this one, I hope this will works for you



        select pets from pets where playstart >= '13:10' and endstart <= '13:50'







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 23 '18 at 11:22









        HARSHIT RATHOREHARSHIT RATHORE

        265




        265






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53442420%2fsql-select-i-dunno-what-exactly-mean%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            How to send String Array data to Server using php in android

            Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

            Is anime1.com a legal site for watching anime?