Creating a read only VIEW but with different field datatype
Posted: Tue Feb 10, 2009 10:38 am
Hi,
I am trying to create a VIEW table in Mysql which is read only.
This is fine with;
However the whole reason behind using this VIEW is that I need a mirrored table that has the DATE/DATETIME fields in "member" as CHAR in "v_member" instead.
Is there a way to create a VIEW table where you can alter the column datatype? I.e a field called start_date that is type DATE in "member" table will be mirror'd in table v_member, but the corresponding field in there will be type CHAR instead?
Apologies if that makes no sense! Any help would be much appreciated!
I am trying to create a VIEW table in Mysql which is read only.
This is fine with;
Code: Select all
CREATE VIEW v_member AS
SELECT *
FROM memberIs there a way to create a VIEW table where you can alter the column datatype? I.e a field called start_date that is type DATE in "member" table will be mirror'd in table v_member, but the corresponding field in there will be type CHAR instead?
Apologies if that makes no sense! Any help would be much appreciated!