my sql

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hishekhar1
    New Member
    • Apr 2007
    • 1

    my sql

    i want to store in a table field which is of integer type I want it in the form
    0001
    0002
    0003
    ..
    ..
    0010
    0011
    and so on.
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    Originally posted by hishekhar1
    i want to store in a table field which is of integer type I want it in the form
    0001
    0002
    0003
    ..
    ..
    0010
    0011
    and so on.
    If you want to store a value as an integer, it is stored as an integer. So your value '0011' (I assume that is the decimal value) will be stored in a 4-byte INTEGER type field as hexadecimal value '0000000B'.

    Formatting should be done when displaying the value, not when storing it.

    Ronald :cool:

    Comment

    • ScarletPimpernal
      New Member
      • Mar 2007
      • 39

      #3
      Hi Ronald

      Can u provide the syntax for getting the values as follows using format as u mentioned below.

      001
      002
      00333


      Thanks,
      Scarlet

      Originally posted by ronverdonk
      If you want to store a value as an integer, it is stored as an integer. So your value '0011' (I assume that is the decimal value) will be stored in a 4-byte INTEGER type field as hexadecimal value '0000000B'.

      Formatting should be done when displaying the value, not when storing it.

      Ronald :cool:

      Comment

      Working...