Can we use the same path for a different route? Are we allowed to use the same path for two different routes? For example, can I use the following code?

function mymodule_menu() {
  $items['myUrl/dboperation'] = array(
    'title' =&gt; 'some custom db operation for insert',
    'page callback' =&gt; 'mydboperation1',
    'access callback' =&gt; TRUE,
    'file' =&gt; 'my_dboperation.inc',
  );

  $items['myUrl/dboperation'] = array(
    'title' =&gt; 'some custom db operation for delete',
    'page callback' =&gt; 'mydboperation2',
    'access callback' =&gt; TRUE,
    'file' =&gt; 'my_dboperation.inc',
  );

  return $items;
}


The code doesn't work. It works when I change the second path.

I was searching for the answer and came across How should I implement hook_menu()? but it doesn't explain what to use for the route path.

Why doesn't my code work? What should I instead use to make it work?
The short answer is NO.
Your would ether make a different path to each function or send an argument to a single function through the url.
eg. different path:  

function mymodule_menu() {

    $items['myUrl/dboperation/insert'] = array(
        'title' =&gt; 'some custom db operation for insert',
        'page callback' =&gt; 'mydboperation1',
        'access callback' =&gt; TRUE,
        'file' =&gt; 'my_dboperation.inc',
    );

    $items['myUrl/dboperation/delete'] = array(
        'title' =&gt; 'some custom db operation for delete',
        'page callback' =&gt; 'mydboperation2',
        'access callback' =&gt; TRUE,
        'file' =&gt; 'my_dboperation.inc',
    );

    return $items;
}


See the hook_menu docs for how to send an argument if you choose to do it that way.