Tag Info

New answers tagged


I've solved it after few hours of trying and googling. This post on stackoverflow was helpful. Instead of IF and ISNULL there should be used CASE WHEN EXISTS like this: SELECT DISTINCT user.id, user.username, user.name, user.surname, user.avatar, CASE WHEN EXISTS (SELECT attendant.fk_user AS u FROM attendant WHERE fk_event = 1 AND fk_user = ...


Change your subquery select to count(*) e.g. select o.OrderID, o.OrderAmount from Orders o where (select count(id) from Disputes d where d.CustomerID = o.CustomerID) <= 0


1) To get a single table restored and/or imported, use mysqldump. See the "how" links in my post here. 2) For a hot copy of InnoDB tables, use Perconas XtraBackup tool (BTW, the Percona website generally and their mysqlperformance blog are excellent MySQL resources). You can also replicate from InnoDB masters to MyISAM slaves and the other way round ...

Top 50 recent answers are included