This video we are going to discuss the VARCHAR2 and the NVARCHAR2 data types.
The previous videos are a good foundation to this video. I've actually discussed so much stuff in those videos that I don’t have a whole lot to say. Good for you, right?
I discussed over the previous videos that you should prefer to use VARCHAR2 over CHAR. That's because there is not a difference in performance or storage for a VARCHAR2 column. The only difference is that an CHAR column forces each value to take up a certain length even if it's not.
There is one difference between the variable length and fixed length data types here that you need to know about, and that is storage limits. CHAR has a limit of 2000 bytes, while VARCHAR2 has a limit of 4000 bytes. That means you can store twice as much junk in a VARCHAR2 column!
Other than that, these data types work exactly the same. I recommend you always use the VARCHAR2 data types instead of the CHAR data types, and only use NVARCHAR2 if you have a non-Unicode database. This will allow you to store Unicode characters in a column.
Now, the amount of storage you can put in a VARCHAR2 column is twice what you can put in a CHAR column, but 4000 characters is still not very many characters. This is where the LOB data types come in, which we will discuss in the next video!
Support me! http://www.patreon.com/calebcurry
Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter
More content: http://CalebCurry.com
Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Hey Caleb, you mentioned at about 1:30 that you should never really use char and that if we had any feedback on this you would like to hear it.
Char is great for columns that contain data that can be expected to always hold the same amount of characters when entered appropriately. For example, Zip codes, area codes (in the event of atomic data in columns), state abbreviations, and middle initials. You could use varchar2 in that case as well and just limit to the same max length, but when processing large amounts of data varchar2 columns have a little bit more processing overhead so it's totally unnecessary. There is debate about how much of an issue that processing overhead is, but it really depends on your data and expected growth.
The following are humorous (and sometimes serious too ) quotes gathered from the Web, Usenets personal .sig and other sources (in particular the excellent and original Top5 mailing list). Since its all a big rip-off, I am assuming no copyright whatsoever. I dont even guarantee that they are accurate. Now that youve been warned, enjoy.
Men Bashing Women Bashing Some images available as wallpaper Some images available on a royalty-free compilation CD Some images available as a poster More: Sexual quotes.
"Do not confuse: Patching up things with our lovers and Repairing the leaks in our inflate-a-dolls ." "Not all men are annoying. Some are dead." "Macho does not prove mucho." — Zsa Zsa Gabor. "Give a man a free hand and hell run it all over you." — Mae West (1892—1980). "You know the movie youre watching is a chick flick if you wake up and your wife is crying." — Rick Oie. "It takes a woman twenty years to make a man of her son, and another woman twenty minutes to make a fool of him." — Helen Rowland.
"Supposedly I was created in gods image. I dont know. youd think god would have a bigger penis than this." — Anthony Myers. "I now stand corrected — there is one gift a woman does not prefer to come in a small package." "When was the last time you saw a size small package of condoms ?" "It would be a mistake to put fluoride in condoms because a cavity is exactly what Im hoping for." — James Knowles. "Any woman that thinks the way to a mans heart is through his stomach is aiming just a little too high." "Men only have two faults: Everything they say and everything they do." "Behind Every Good Man Is An Even Better Woman." "You cant throw him back because he doesnt meet the legal size limit." — Dave Henry, Honeymoon Tip for Brides. "All women become like their mothers. That is their tragedy. No man does. Thats his." — Oscar Wilde. "Knowing what I do now about women, if I could just travel back in time to when I was 16 years old, I bet I would have gotten laid by now." — Ed Smith. "There is so little difference between husbands you might as well keep the first." — Adela Rogers St. John. "Outside every thin woman is a fat man trying to get in." — Katherine Whitehorn. "You can tell a lot about a woman by her hands. For instance if they are placed around your throat, shes probably slightly upset." "Men are like small children. You bring a new one home and the ones already there resent it." "Men are like bank accounts. Without a lot of money they dont generate a lot of interest." "If Adam had had a real hairy back, we probably wouldnt be here today." — Dave Henry.e.