Cuando te pregunto:
¿Le dijiste que no?
Código [Seleccionar]
Do you want to add these lines automatically to /etc/modules? (yes/NO)
¿Le dijiste que no?
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menú
Do you want to add these lines automatically to /etc/modules? (yes/NO)
DELIMITER //
DROP PROCEDURE `changeVal`
CREATE PROCEDURE `changeVal`()
BEGIN
DECLARE index INT DEFAULT 2;
DECLARE rowCount INT;
DECLARE oldVal INT;
SET count = (SELECT COUNT(*) FROM tabla);
WHILE (rowCount > index) DO
SET oldVal = (SELECT valor FROM tabla WHERE id = rowCount-1);
UPDATE tabla SET valor = valor - oldVal WHERE id = rowCount;
SET rowCount = rowCount -1;
END WHILE
END //
DELIMITER //
DROP PROCEDURE `changeVal`
CREATE PROCEDURE `changeVal`()
BEGIN
DECLARE index INT DEFAULT 2;
DECLARE count INT;
DECLARE oldVal INT;
DECLARE myRow INT;
SET count = (SELECT COUNT(*) FROM tabla);
WHILE (count > index) DO
SET oldVal = (SELECT valor FROM tabla LIMIT 1, count-2);
SET myRow = (SELECT id FROM tabla LIMIT 1, count-1);
UPDATE tabla SET valor = valor - oldVal WHERE id = myRow;
SET count = count - 1;
END WHILE
END //
UPDATE tabla SET campo3 = campo3 - campo2, campo2 = campo2 - campo1
SELECT members.*, account_type.*
FROM members
INNER JOIN account_type ON `members`.`acc_type` = `account_type`.`type`
SELECT members.*, account_type.*, friends.*
FROM members
INNER JOIN account_type ON `members`.`acc_type` = `account_type`.`type`
INNER JOIN friends ON friends.userID = members.id
SELECT members.*, account_type.*, friends.*, membersF.*
FROM members
INNER JOIN account_type ON `members`.`acc_type` = `account_type`.`type`
INNER JOIN friends ON friends.userID = members.id
INNER JOIN members AS membersF ON membersF.id = friends.friendID
SELECT members.*, account_type.*, friends.*, membersF.*, acctypeF.*
FROM members
INNER JOIN account_type ON `members`.`acc_type` = `account_type`.`type`
INNER JOIN friends ON friends.userID = members.id
INNER JOIN members AS membersF ON membersF.id = friends.friendID
INNER JOIN account_type AS acctypeF ON `membersF`.`acc_type` = `acctypeF`.`type`
DESCRIBE friends;
SELECT * FROM tabla INNER JOIN tabla2
SELECT * FROM tabla CROSS JOIN tabla2