Now there was(i first thought) one solution,that is to create a view, but i read somewhere(not sure?) that when we update(not alter) the view, i.e when we update the data in the view, the original table is also updated. I haven't found any good document about this. And havent bothered to try it myself.
Then i thought why not ask to people who better know these things... and where these geeks can be found (forums, nowadays are full of marketting), so the only other place is IRC, so installed chatZilla for the first time and tried to chat through IRC and there i got the real answer!..
We need to COPY the table into a new one every time we need it, and then just drop it when the work is over! done!... But its not as easy(!its time consuming). so i got a command "SELECT INTO". which can copy my table into a new one (even in other database). But it was not working, i was like...Eh... WHY?? then i found that mysql doesn't support it and so i got another one "INSERT INTO ... SELECT ..." (a more simple one than i thought!).. It worked!...
So the moral of the story is whenever you got problem go "SELECT INTO CHATZILLA".
0 comments:
Post a Comment