- Опишите пожалуйста вашу задачу целиком , ыы (?), 06:37 , 06-Окт-21 (1)
> прошу вас не ругаться а просто помочь > сгенерировать последовательность чисел в mysql on 00001 до 10000 и вставить в > таблицу Опишите пожалуйста вашу задачу целиком.
- man seqЧитайте, позволяет дополнять слева нулями до определённой ширины , Павел Отредиез (ok), 18:17 , 06-Окт-21 (8)
> прошу вас не ругаться а просто помочь > сгенерировать последовательность чисел в mysql on 00001 до 10000 и вставить в > таблицу man seq Читайте, позволяет дополнять слева нулями до определённой ширины.
- Here s an example of how to generate a sequence of numbers from 00001 to 10000 i, James Millere (ok), 15:57 , 31-Янв-23 (13)
Here's an example of how to generate a sequence of numbers from 00001 to 10000 in MySQL and insert them into a table:CREATE TABLE numbers (num INT); DELIMITER $$ CREATE PROCEDURE insert_numbers() BEGIN DECLARE i INT DEFAULT 1; WHILE i <= 10000 DO INSERT INTO numbers (num) VALUES (i); SET i = i + 1; END WHILE; END $$ DELIMITER ; CALL insert_numbers(); In this example, a table named numbers is created with a single column num of type INT. Then, a stored procedure named insert_numbers is created which uses a loop to generate the sequence of numbers and insert them into the numbers table. Finally, the stored procedure is called to generate the numbers and insert them into the table.
Thanks
|