Ask Your Question

What is the distinction between the "int" and "int(2)" data types?

asked 2022-11-02 11:00:00 +0000

woof gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2021-08-02 13:00:00 +0000

david gravatar image

In most database management systems, there is no significant difference between "int" and "int(2)" data types. "int" stands for integer and represents a whole number (positive, negative or zero) in the range of -2147483648 to 2147483647. While "int(2)" specifies the display width of that integer in characters.

The number in parentheses, such as "int(2)", is used for display purposes only and has no impact on the storage size or range of values of the integer. It is often used as a suggestion to front-end developers about the display width of the integer for applications.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer

Question Tools


Asked: 2022-11-02 11:00:00 +0000

Seen: 8 times

Last updated: Aug 02 '21