Click here to Skip to main content
   

Database

 
AnswerRe: char(255) vs varchar(255) vs varchar(MAX) PinmvpRichard MacCutchan2-Feb-13 0:07 
GeneralRe: char(255) vs varchar(255) vs varchar(MAX) [modified] Pinmemberdevvvy2-Feb-13 16:39 
AnswerRe: char(255) vs varchar(255) vs varchar(MAX) PinmemberPIEBALDconsult2-Feb-13 6:22 
GeneralRe: char(255) vs varchar(255) vs varchar(MAX) Pinmemberdevvvy3-Feb-13 0:30 
I think it's the opposite. CHAR don't store trailing termination char (2 bytes for SQL), varchar does.
 
I think I found the answer. With VARCHAR(MAX), you can't index the column and also you don't have length checks provided for you by default by database, that's why you should always use VARCHAR(n) as supposed to VARCHAR(MAX)
 
CHAR(n) when lenght same for all/most rows.
dev

GeneralRe: char(255) vs varchar(255) vs varchar(MAX) Pinmemberjschell3-Feb-13 7:36 
QuestionSP Unexpected Behavior Pinmembereddieangel1-Feb-13 8:19 
QuestionEncrypt a field in the database. Pinmembervanikanc1-Feb-13 6:31 
AnswerRe: Encrypt a field in the database. PinmvpEddy Vluggen1-Feb-13 8:02 
Questioncheck before insert Pinmembervanikanc31-Jan-13 5:55 
AnswerRe: check before insert PinmvpEddy Vluggen31-Jan-13 6:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.150326.1 | Last Updated 27 Mar 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid