473,395 Members | 1,537 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

int datatype

Hi,

In mySQL, I found the date type has smallint, int and bigint. What are their
differences? I set a field with auto_increment as int type, what will happen
when the number reaches to the limit? Thanks for any help.

Atse
Jul 19 '05 #1
4 7754
atse wrote:
In mySQL, I found the date type has smallint, int and bigint. What are their
http://www.mysql.com/doc/en/Numeric_types.html
differences? I set a field with auto_increment as int type, what will happen
when the number reaches to the limit? Thanks for any help.


It will give you an sql error if you try to insert row while it can't
put it there. You should always use types that are large enough. Also,
use int unsigned if you are using auto_increment, because you don't need
negative values and it will give you twice as much positive numbers.

Jul 19 '05 #2
atse wrote:
In mySQL, I found the date type has smallint, int and bigint. What are their
http://www.mysql.com/doc/en/Numeric_types.html
differences? I set a field with auto_increment as int type, what will happen
when the number reaches to the limit? Thanks for any help.


It will give you an sql error if you try to insert row while it can't
put it there. You should always use types that are large enough. Also,
use int unsigned if you are using auto_increment, because you don't need
negative values and it will give you twice as much positive numbers.

Jul 19 '05 #3
Got it, thanks.

"Aggro" <sp**********@yahoo.com> wrote in message
news:uH***************@read3.inet.fi...
atse wrote:
In mySQL, I found the date type has smallint, int and bigint. What are their

http://www.mysql.com/doc/en/Numeric_types.html
differences? I set a field with auto_increment as int type, what will

happen when the number reaches to the limit? Thanks for any help.


It will give you an sql error if you try to insert row while it can't
put it there. You should always use types that are large enough. Also,
use int unsigned if you are using auto_increment, because you don't need
negative values and it will give you twice as much positive numbers.

Jul 19 '05 #4
Got it, thanks.

"Aggro" <sp**********@yahoo.com> wrote in message
news:uH***************@read3.inet.fi...
atse wrote:
In mySQL, I found the date type has smallint, int and bigint. What are their

http://www.mysql.com/doc/en/Numeric_types.html
differences? I set a field with auto_increment as int type, what will

happen when the number reaches to the limit? Thanks for any help.


It will give you an sql error if you try to insert row while it can't
put it there. You should always use types that are large enough. Also,
use int unsigned if you are using auto_increment, because you don't need
negative values and it will give you twice as much positive numbers.

Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Sanjay Minni | last post by:
What is the datatype to be used for Primary Key columns for most optimised access given that - There will be a single column primary key only - The values will only be integers (but as...
1
by: thepercival | last post by:
Hello, I have a stored procedure and the return data type is number(16) as you can see. but I get it back in the code as a var_numeric and then the precision depends on the value of the...
8
by: Eternally | last post by:
Hi folks, I've got a program which has a function which uses templates to accept parameters of any type. Works well, but there's one certain datatype which I want to special case and do an...
0
by: SoYouKnowBrig | last post by:
Hi All, I am using Microsoft.ApplicationBlocks.Cache.CacheManager to persist a System.Data.Dataset object. This Dataset object has a DataTable that is created from an existing DataTable using...
10
by: andrewcw | last post by:
I read in a earlier post that I can get the column of a grid to sort by datetime if the column type was set as Date I deserialize my XML and one attribute of the XSD has type as dateTime but upon...
3
by: Sri | last post by:
In VB, to know the field type of a column stored in a recordset the command I use is If rsQuery.Fields(k).Type = adCurrency Then How will I achieve the same in ASP.net. I could not find a...
1
by: Bryan | last post by:
I have a class called "Prop". I want that class to have a property called "DataType" where the user can select and store a datatype. How can I store a DataType value in a class property. how...
4
by: Orchid | last post by:
How can I change a Date datatype to a Number datatype? For example, I want a date 10/31/2006 to show 1031 as Number datatype. But I don't want it becomes 39021. What formula should I use? ...
0
by: graju80 | last post by:
I am kind of new to Db2... Question: What are the rules that DB2 uses to determine the right datatype for a particular column for on-the-fly SQL generation? For example...
11
by: BD | last post by:
Hi, all. I'm running 8.2 on Windows. This is a development platform for a project whose production environment is running on a mainframe. I believe that the RI compilation process is not...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.