Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个表 EMPLOYEE1,我正在尝试将值插入其中
INSERT INTO EMPLOYEE1 values(00001, 00004566)
但是它将值插入为 1 和 4566 截断零的原因是为什么会发生这种情况。有人可以帮我吗
发生这种情况是因为该列的数据类型是数字。您应该使这些列 varchar 能够插入数字而不转换零。就像是:
CREATE TABLE Employee1(EmpNumber VARCHAR(50), EmpName VARCHAR(50), ...); INSERT INTO Employee1 VALUES ('00001', 'Foo', ..);