MySQL 如何使用 SQL 将列定义为 64 位整数
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10220942/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How can I define a column as 64bit integer using SQL
提问by speedmancs
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?
如何将第二列定义为 64 位整数?
回答by Salman A
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.
在 MySQL 中,BIGINT
数据类型表示一个 8 字节(64 位)整数。它可以是SIGNED
或UNSIGNED
允许(或阻止)列中的负数。
You can read more about all variants of MySQL integer data types here. The column attributes are discussed here.
回答by Valamas
I assume you are using Sql Server. You want to use a
我假设您使用的是 Sql Server。你想使用一个
bigint - signed 64-bit.