0

I make a backup of some database from distance server, and I had an problem on my local server when I trying to import that backup. I get an error in this line:

-- 
-- Table structure for table `kean_mails`
-- 

CREATE ALGORITHM=UNDEFINED DEFINER=CURRENT_USER SQL SECURITY DEFINER VIEW `kean_mails` AS select `kean`.`kean_id` AS `id`,`kean`.`name` AS `name`,`kean`.`email` AS `email`,`kean`.`datekean` AS `datesub`,`kayan_acts`.`active` AS `active` from (`kean` join `kayan_acts` on((`kean`.`kean_id` = `kayan_acts`.`kean_id`)));

-- 
-- Dumping data for table `kean_mails`
-- 

INSERT INTO `kean_mails` VALUES (3, '', '', '0000-00-00 00:00:00', 0);

1394 - Can not insert into join view 'teachmea_kayan.kean_mails' without fields list

  • Sorry, How can I figure out that? since I am not profossinal in sql. – Mohammed Haddad Jun 10 '19 at 08:09
  • this is the error #1394 - Can not insert into join view 'teachmea_kayan.kean_mails' without fields list – Mohammed Haddad Jun 10 '19 at 08:10
  • Possible duplicate of [Is it possible to insert data into a MySQL view?](https://stackoverflow.com/questions/3825941/is-it-possible-to-insert-data-into-a-mysql-view) – djm.im Jun 10 '19 at 08:16
  • 1
    You should not insert anything into your views during a restore. In fact, you should only back-up the create view statements for your views, not the data. View is really just a stored select. If your restore the data to the underlying tables and recreate the view, then the view will have all the data. – Shadow Jun 10 '19 at 08:28
  • I would go further. Searches in Views in MySQL cannot utilize underlying indexes, rendering them (in my view) useless. – Strawberry Jun 10 '19 at 08:54

0 Answers0