Scifa Posted March 3, 2006 Share Posted March 3, 2006 Can someone please tell me what is bigger256 as int or GB as varcharThanks Quote Link to comment https://forums.phpfreaks.com/topic/4000-whats-bigger/ Share on other sites More sharing options...
AndyB Posted March 3, 2006 Share Posted March 3, 2006 Pretty weird question :)256 is three bytes (unsigned), GB is two bytes. Quote Link to comment https://forums.phpfreaks.com/topic/4000-whats-bigger/#findComment-13879 Share on other sites More sharing options...
Scifa Posted March 3, 2006 Author Share Posted March 3, 2006 We have a database of users and inside there is a 2/3 varchar value to hold the the country code i.e. GB I want to move it over to another table and reference it by id but was told somehting about 256 begin bigger then GB ???? Quote Link to comment https://forums.phpfreaks.com/topic/4000-whats-bigger/#findComment-13901 Share on other sites More sharing options...
Barand Posted March 4, 2006 Share Posted March 4, 2006 A SMALLINT type takes 2 bytes.GB as a VARCHAR would require 3 bytes. As CHAR it would require 2 bytes. Quote Link to comment https://forums.phpfreaks.com/topic/4000-whats-bigger/#findComment-14230 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.