Advertisement
Guest User

Untitled

a guest
Jun 15th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. UPDATE table SET col = LPAD(col, 6, '0');
  2.  
  3. CREATE TABLE table1 (
  4. number INT(6) ZEROFILL DEFAULT NULL
  5. );
  6.  
  7. INSERT INTO table1 VALUES(1);
  8. SELECT * FROM table1;
  9. +--------+
  10. | number |
  11. +--------+
  12. | 000001 |
  13. +--------+
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement