Well I would explain it evidently!
First I create a table called friends with so-and-so parameters ..
create table friends(name varchar(25) not null, degree varchar(10) not null, initials varchar(5) not null, marks decimal(4,1) not null, datentime datetime not null primary key);
and then I insert data as follows ..
insert into friends values('femil','bsc','a',59,'2008-12-09 20:20:57');
insert into friends values('arun','bsc','k',64,'2008-12-09 20:21:57');
insert into friends values('edwin','bsc','c',72,'2008-12-09 20:22:57');
insert into friends values('aravind','bsc','a',58,'2008-12-09 20:23:57');
Now I have a set of records in my table. Now I clone the table by
show create table friends \G;
*************************** 1. row ***************************
Table: friends
Create Table: CREATE TABLE `friends` (
`name` varchar(25) NOT NULL,
`degree` varchar(10) NOT NULL,
`initials` varchar(5) NOT NULL,
`marks` decimal(4,1) NOT NULL,
`datentime` datetime NOT NULL,
`filename` varchar(20) DEFAULT NULL,
PRIMARY KEY (`datentime`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
1 row in set (0.00 sec)
and create an alias-table
CREATE TABLE `friends2` (
`name` varchar(25) NOT NULL,
`degree` varchar(10) NOT NULL,
`initials` varchar(5) NOT NULL,
`marks` decimal(4,1) NOT NULL,
`datentime` datetime NOT NULL,
`filename` varchar(20) DEFAULT NULL,
PRIMARY KEY (`datentime`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
Now I insert my 'friends' table by
insert into friends values('sandeep','bsc','s',75,'2008-12-09 20:24:57');
Well, here comes my question now ..
This insertion is obviously not reflected in 'friends2'. What should I do so that this insertion is also reflected or added in the cloned table here 'friends2' not only once but als o infinite number of times i insert or update or delete rows from the original table 'friends'
Note: Please dont tell me to insert it at the beginning itself. This is just a prototype and I'm doing a real-time concept whatever I told you! Any ideas friends?