根据下述建表代码向welfareinfo插入五条内容
时间: 2023-07-03 18:23:15 浏览: 65
好的,以下是向 welfareinfo 表插入五条数据的示例 SQL 查询语句:
```
INSERT INTO WelfareInfo (ID, EmployeeID, WelfareType, WelfareAmount, WelfareDate)
VALUES
(1, 1001, '五险一金', 3000.00, '2021-10-01'),
(2, 1002, '带薪年假', 2000.00, '2021-09-01'),
(3, 1003, '股票期权', 5000.00, '2021-11-01'),
(4, 1004, '通勤补贴', 800.00, '2021-10-01'),
(5, 1005, '生日福利', 500.00, '2021-08-01');
```
请注意,上述查询语句中的具体值是根据你的实际需求和数据库结构而定的。如果你想要向 welfareinfo 表插入不同的数据,请根据实际情况修改相应的值。
相关问题
CREATE TABLE EmployeeInfo ( ID INT PRIMARY KEY, Name VARCHAR(50) NOT NULL, Gender VARCHAR(10) NOT NULL, Birthday DATE, Department VARCHAR(50), Position VARCHAR(50), HireDate DATE, Salary DECIMAL(10, 2), Phone VARCHAR(20), Email VARCHAR(50) ); CREATE TABLE SalaryInfo ( ID INT PRIMARY KEY, EmployeeID INT NOT NULL, Salary DECIMAL(10, 2) NOT NULL, StartDate DATE NOT NULL, EndDate DATE, FOREIGN KEY (EmployeeID) REFERENCES EmployeeInfo(ID) ); CREATE TABLE AttendanceInfo ( ID INT PRIMARY KEY, EmployeeID INT NOT NULL, AttendanceDate DATE NOT NULL, SignTime DATETIME, LeaveTime DATETIME, FOREIGN KEY (EmployeeID) REFERENCES EmployeeInfo(ID) ); CREATE TABLE WelfareInfo ( ID INT PRIMARY KEY, EmployeeID INT NOT NULL, WelfareType VARCHAR(50) NOT NULL, WelfareAmount DECIMAL(10, 2) NOT NULL, WelfareDate DATE NOT NULL, FOREIGN KEY (EmployeeID) REFERENCES EmployeeInfo(ID) ); CREATE TABLE DepartmentInfo ( ID INT PRIMARY KEY, DepartmentName VARCHAR(50) NOT NULL, ManagerID INT, Description VARCHAR(200) );
好的,以下是向AttendanceInfo表插入五条内容的SQL语句示例:
INSERT INTO AttendanceInfo(ID, EmployeeID, AttendanceDate, SignTime, LeaveTime) VALUES (1, 1001, '2021-07-01', '2021-07-01 09:00:00', '2021-07-01 18:00:00');
INSERT INTO AttendanceInfo(ID, EmployeeID, AttendanceDate, SignTime, LeaveTime) VALUES (2, 1001, '2021-07-02', '2021-07-02 09:10:00', '2021-07-02 18:00:00');
INSERT INTO AttendanceInfo(ID, EmployeeID, AttendanceDate, SignTime, LeaveTime) VALUES (3, 1002, '2021-07-01', '2021-07-01 09:05:00', '2021-07-01 18:30:00');
INSERT INTO AttendanceInfo(ID, EmployeeID, AttendanceDate, SignTime, LeaveTime) VALUES (4, 1002, '2021-07-02', '2021-07-02 09:20:00', '2021-07-02 18:20:00');
INSERT INTO AttendanceInfo(ID, EmployeeID, AttendanceDate, SignTime, LeaveTime) VALUES (5, 1003, '2021-07-01', '2021-07-01 09:15:00', '2021-07-01 18:15:00');
注意,在实际插入数据时,你需要根据自己的表结构和具体需要进行调整和修改。
阅读全文