How can I define a column as 64bit integer using SQL

28,607

Solution 1

In MySQL, the BIGINT datatype represents an 8 byte (64-bit) integer. It can be SIGNED or UNSIGNED which permits (or prevents) negative numbers in the column.

You can read more about all variants of MySQL integer data types here. The column attributes are discussed here.

Solution 2

I assume you are using Sql Server. You want to use a

bigint - signed 64-bit.
Share:
28,607

Related videos on Youtube

speedmancs
Author by

speedmancs

Updated on July 18, 2022

Comments

  • speedmancs
    speedmancs almost 2 years

    I'm creating a table as following:

    create table SomeTable (
    LoginTime int,
    someValue 64bit-int
    )
    

    How can I define the second column as 64bit integer?

    • marc_s
      marc_s about 12 years
      What database system, and which version?? SQL is just the Structured Query Language - a language used by many database systems - SQL is NOT a database product... stuff like this is very often vendor-specific - so we really need to know what database system you're using....
  • speedmancs
    speedmancs about 12 years
    i'm using mysql indeed, is bigint ok for mysql?
  • Valamas
    Valamas about 12 years
    Yes (10 more characters to go)
  • milahu
    milahu about 2 years
    BIGINT UNSIGNED or BIGINT SIGNED

Related