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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 13:01:40  来源:igfitidea点击:

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

mysqlsqlinteger

提问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 BIGINTdatatype represents an 8 byte (64-bit) integer. It can be SIGNEDor UNSIGNEDwhich permits (or prevents) negative numbers in the column.

在 MySQL 中,BIGINT数据类型表示一个 8 字节(64 位)整数。它可以是SIGNEDUNSIGNED允许(或阻止)列中的负数。

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

您可以在此处阅读有关 MySQL 整数数据类型的所有变体的更多信息。列属性在此处讨论。

回答by Valamas

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

我假设您使用的是 Sql Server。你想使用一个

bigint - signed 64-bit.