• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

help with basic SQL

 
André Asantos
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, I have a basic doubt of SQL language structurei, look at:

bigint, int, smallint, tinyint but what is more used? varchar?

e.g: a columm with 11 numbers of identification as (CPF from Brazil) must I use int (11) or varchar (100) or another one?

bye,
AS
 
Campbell Ritchie
Sheriff
Posts: 48382
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please explain more details. What's a CPF? If you have a fixed number of characters, particularly if they start with "000" char(11) might be a better format.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic