Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • ELT function mysql

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 543
    Comment on it

    ELT(N,str1,str2,str3,...)

    The MySQL ELT function is used for get the Nth element of all listed arguments in the function. The first argument is used for which number of element you want to get. In the argument list the if N = 1 then return str1 and str2 if N = 2, and so on. Returns NULL if N is less than 1 or greater than the number of arguments. ELT() is the complement of FIELD().

    mysql> select ELT('2','My','SQL');
    +---------------------+
    | ELT('2','My','SQL') |
    +---------------------+
    | SQL                 |
    +---------------------+
    1 row in set (0.00 sec)
    
    mysql> select ELT('4','Hello','World.','How','are','you');
    +---------------------------------------------+
    | ELT('4','Hello','World.','How','are','you') |
    +---------------------------------------------+
    | are                                         |
    +---------------------------------------------+
    1 row in set (0.00 sec)
    
    mysql> select ELT('3','Hello','World.','How','are','you');
    +---------------------------------------------+
    | ELT('3','Hello','World.','How','are','you') |
    +---------------------------------------------+
    | How                                         |
    +---------------------------------------------+
    1 row in set (0.00 sec)
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: