INSERT IGNORE INTO cmdev.dept
VALUES (500, 'MIS', DEFAAULT);
SELECT *
FROM cmdev.travel
WHERE empno = 7900 AND
location = 'BOSTON'
INSERT INTO cmdev.travel
VALUES (7900, 'BOSTON',1);
UPDATE cmdev.travel
SET counter = counter +1
WHERE empno = 7900 AND
location = 'BOSTON'
INSERT INTO cmdev.travel
VALUES (7900. 'BOSTON' , 1)
ON DUPLICATE KEY UPDATE counter = counter +1
INSERT INTO cmdev.dept
VALUES (50, 'MIS',DEFAULT)
INSERT IGNORE INTO cmdev.dept
VALUES (50, 'MIS',DEFAULT)
REPLACE INTO cmdev.dept
VALUES (50, 'MIS',DEFAULT)
UPDATE cmdev.up
SET salary = salary
ORDER BY salary
UPDATE cmdev.emp
SET salary = salary +100
Limit 3
DELETE FROM cmdev.emp
WHERE salary < 1500
DELETE FROM cmdev.emp
ORDER BY salary
DELETE FROM cmdev.emp
ORDER BY salary DESC
LIMIT 3
TRUNCATE TABLE cmdev.emp
Edit preference Sql editor > safe updates
START TRANSACTION;
DELETE FROM CMDEV.EMP WHERE EMPNO = 8002;
ROLLBACK;(回復)
COMMIT; (確認)
show varibles like 'datadir';
留言列表