SELECT COUNT(*) FROM `$table`;
      Sql language logo

      select count

      SQL public snippets

      The SELECT COUNT function returns the number of occurrences of a particular column in a table. The expression in the code uses the AS keyword to create a temporary view of the table. The name of the view is then passed as an input to the SELECT COUNT function. The result of the function is then assigned to the variable ${&[USER_INPUT:2]/(.).*/$&[USER_INPUT:1]/}. This expression calculates the total number of records in the table that have the user_input column value 1.

      Shortcut: s_scount

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.