Re: question about SQL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rasha Abdo wrote:
> Hi,
>   how can i define data type of filed like this:
>    
>   3 characters and 6 auto increment numbers (example: "DLL -  123456")
>    
>   thanks.
You cannot, you will have to use two columns. Furthermore, numbers
aren't of a certain length. You might want to create the two colums like
this:

CREATE TABLE example (
  characters CHAR(3) NOT NULL,
  number INT(10) NOT NULL auto_increment
);

~ Ruben


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux