Calendar Tables: An Invaluable Database Tool
It’s Friday, and the boss just asked you to produce a report that summarizes all the issues your team has dealt with in the past…
Redenumire automata coloane / tabele in lowercase in MySQL
Redenumire coloane lowercase SELECT CONCAT('ALTER TABLE ', TABLE_NAME, ' CHANGE `', COLUMN_NAME, '` `', LOWER(COLUMN_NAME), '` ', COLUMN_TYPE, ';') FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = '_Nume…
Cum obti un string de 8 caractere random in MySQL
Cum poti obtine un string de 8 caractere random in MySQL INSERT INTO tbl VALUES (blah); -- introducem valoarea SELECT @lid:=LAST_INSERT_ID(); UPDATE tbl SET random_field=concat(…