Jump to content

Archived

This topic is now archived and is closed to further replies.

Scifa

Whats bigger

Recommended Posts

Can someone please tell me what is bigger

256 as int or GB as varchar

Thanks

Share this post


Link to post
Share on other sites
Pretty weird question :)

256 is three bytes (unsigned), GB is two bytes.

Share this post


Link to post
Share on other sites
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 ????

Share this post


Link to post
Share on other sites
A SMALLINT type takes 2 bytes.

GB as a VARCHAR would require 3 bytes. As CHAR it would require 2 bytes.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.