As a matter of interest how does how cast columns from say String to
Integer implicitly?

For example the following shows this

create table s(col1 String);
insert into s values("1");
insert into s values("2");

Now create a target table with col1 being integer


create table o (col1 Int);
insert into o select * from s;

select * from o;
+---------+--+
| o.col1  |
+---------+--+
| 1       |
| 2       |
+---------+--+

So this implicit column conversion from String to Integer happens without
intervention in the code. As a matter of interest what is the underlying
storage for Integer. In a conventional RDBMS this needs to be done through
cast (CHAR AS INT) etc?

Thanks



Dr Mich Talebzadeh



LinkedIn * 
https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw
<https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw>*



http://talebzadehmich.wordpress.com

Reply via email to