Skip to main content
5 votes
Accepted

Delete records in different tables

You can't ordinarily delete from more than one table in a single T-SQL DELETE statement. It is possible to achieve the same effect using triggers or cascading foreign keys with an ON DELETE CASCADE ...
Paul White's user avatar
  • 90.3k
2 votes

MariaDB table is broken after failed dump process

XAMPP(V.3.2.2) is really old. As is MariaDB 10.1.10 (Dec 2015) which it includes. The entire 10.1 series is now unsupported by the upstream MariaDB. Recommend: A physical copy of C:/xampp/mysql/data ...
danblack's user avatar
  • 8,009
2 votes

mysqldump: Got error: 2002: "Can't connect to MySQL server on 'x' (code)" when trying to connect

mysqldump -e -uNAME -pPWD -hHOST DATABASENAME > C:\winhostMySqlD.sql I hope you gave this command for representational purpose, if you execute this command as it is, you will get an error. Below ...
Rathish Kumar B's user avatar
2 votes
Accepted

Insert rows in 3 tables in a single query, SQL SERVER 2008

If your reason is to save space in your PHP, you might can use a Stored Procedure for this. Example below: CREATE PROCEDURE dbo.InsertUserStuff @UserIndex INT, @SkillPoint INT, @TotalSkill ...
Peter's user avatar
  • 2,482
1 vote
Accepted

How to calculate quantity based on a boolean field and retrieve values from a JSON field in MySQL

CREATE TABLE price_options ( id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, slots BOOLEAN, quantity INT, list_slots TEXT NULL ); INSERT INTO price_options (slots, quantity, list_slots) ...
Akina's user avatar
  • 20.3k

Only top scored, non community-wiki answers of a minimum length are eligible