Visualizzazione dei risultati da 1 a 4 su 4
  1. #1

    Generazione numeri in tabella

    Devo generare una tabella di un solo campo,
    Inserisco 1 nella prima riga e uno script aggiunge automaticamente nella riga successiva il doppio del numero della riga precedente (ripetendo il procedimento infinite volte).
    Prima o poi una riga conterrà un numero molto grande: come posso fare affincgè nella tabella si possano inserire numeri grandissimi?

  2. #2

  3. #3
    Eh con il passare del tempo i numeri raggiungeranno cifre sempre più grandi

  4. #4
    Cito e quoto una frase che Filippo.Toso usa spesso
    ti consiglio di iniziare dal Manuale Ufficiale


    Inoltre, cito e quoto il manuale ufficiale di MySQL 5.
    5.2.1. Integer Data Types
    Integer data types include TINYINT, SMALLINT, MEDIUMINT, INT, and BIGINT. Smaller integer types require less storage space, but are more limited in the range of values they represent. For example, TINYINT column values take only one byte each to store, but the type has a small range (–128 to 127). INT column values require four bytes each, but the type has a much larger range (–2,147,483,648 to 2,147,483,647). The integer data types are summarized in the following table, which indicates the amount of storage per value that each type requires as well as its range. For integer values declared with the UNSIGNED attribute, negative values are not allowed, and the high end of the range shifts upward to approximately double the maximum positive value of the signed range.

    Type
    Storage Required
    Signed Range
    Unsigned Range

    TINYINT
    1 byte
    –128 to 127
    0 to 255

    SMALLINT
    2 bytes
    –32,768 to 32,767
    0 to 65,535

    MEDIUMINT
    3 bytes
    –8,388,608 to 8,388,607
    0 to 16,777,215

    INT
    4 bytes
    –2,147,683,648 to 2,147,483,647
    0 to 4,294,967,295

    BIGINT
    8 bytes
    –9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
    0 to 18,446,744,073, 709,551,615

    Integer data types may be declared with a display width, which affects the number of digits used to display column values in query output. For example, assume that you declare an INT column with a display width of 4 like this: [omissis]
    Se il numero di partenza è sempre un intero, una tabella BIGINT può fare al caso tuo??

    <ALCIO />
    Per cortesia: no PVT Tecnici
    ******* LINKS *******
    SRL
    MetalWave

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.