Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2008
    Posts
    22

    Unanswered: About Signed/Unsigned Types

    Dear Members

    I have read this Numeric Types


    about BIGINT

    Code:
    Signed -9223372036854775808 to 9223372036854775807 
    Unsigned 0 to 18446744073709551615
    Well I am very interesting with Unsigned since I want only positive number for my PK auto_increment

    I have the doubt about how create explicitly like Unsigned when I define my table creation.

    Because when I do the backup, I can see

    Code:
    DROP TABLE IF EXISTS `articulo`; 
    CREATE TABLE `articulo` ( 
    `idArticulo` bigint(20) NOT NULL auto_increment, 
    `codigoArticulo` varchar(70) NOT NULL, 
    ...
    but How I can know that bigint is Signed/Unsigned explicitly ???

    In MySQL query browser if I execute the describe articulo query
    I get

    Code:
    'idArticulo', 'bigint(20)', 'NO', 'PRI', '', 'auto_increment' 
    'codigoArticulo', 'varchar(70)', 'NO', '', '', ''
    but not appear if is Signed/Unsigned

    The only way that I can see is doing right click in the table and select
    Edit Table where I can see the column flags with the values for such field (PK) UNSIGNED and ZEROFILL

    Some guidance going to be appreciate

    Thanks in advanced

  2. #2
    Join Date
    Sep 2009
    Location
    San Sebastian, Spain
    Posts
    880
    Try creating it as follows:

    DROP TABLE IF EXISTS `articulo`;
    CREATE TABLE `articulo` (
    `idArticulo` bigint(20) unsigned NOT NULL auto_increment,
    `codigoArticulo` varchar(70) NOT NULL,
    Ronan Cashell
    Certified Oracle DBA/Certified MySQL Expert (DBA & Cluster DBA)
    http://www.it-iss.com
    Follow me on Twitter

  3. #3
    Join Date
    Jan 2008
    Posts
    22
    Hello it-iss.com

    Thank you!, work

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •