1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[SQL] Db2 z/OS - SYSIBM.SYSTABLES.CARDF does not equal COUNT(*)

Discussão em 'Outras Linguagens' iniciado por Stack, Novembro 8, 2024 às 11:02.

  1. Stack

    Stack Membro Participativo

    Why does this:

    SELECT
    CARDF AS "ROW_COUNT"
    FROM SYSIBM.SYSTABLES TABLES
    WHERE TYPE = 'T'
    AND "OWNER" = 'MY_SCHEMA'
    AND NAME = 'MY_TABLE'
    ;


    have a different result than this:

    SELECT COUNT(*) AS "ROW_COUNT"
    FROM MY_SCHEMA.MY_TABLE
    ;


    [​IMG]

    EDIT:

    The left number in the screenshot belongs to the SYSIBM.SYSTABLES query. The right number to the COUNT query.

    The table does not contain CLOBs or other BLOBs but large VARCHAR columns.

    Continue reading...

Compartilhe esta Página