如何在初始记录和最终记录列中创建数字序列,注意:两列中的记录必须相同!注意:我想重复其他列中的信息,只在初始记录和最终记录中生成序列,这两个列都是相同的序列号
INSERT INTO table ('company', 'name', 'phone', 'initial_register', 'final_register', 'sales_id', 'justification', 'data_inserted', 'protocol')
VALUES (1, 'Joao', '99999-0000', '', '', 'Sale at the credential', '2020-11-04 15:43:09', NULL);
WHERE initial_register> 000001
AND final_register <100000发布于 2021-01-16 04:28:52
我找到了另一种方法,但它仍然使列初始记录和最终记录中的值为零,我希望使用顺序。
> Insert Into table (
> company,
> name,
> phone,
> initial_register,
> final_register
> )
>SELECT
> '5' as company,
> name,
> phone,
> initial_register >=1 and initial_register <= 3 as
>initial_register,
> final_register >=1 and final_register <= 3 as final_register,
>from table Where company = 1https://stackoverflow.com/questions/64805563
复制相似问题