要输入数据到SQL Server创建的表中,可以使用以下方法之一:
INSERT INTO table_name (column1, column2, column3) VALUES (value1, value2, value3);
示例:
INSERT INTO employees (first_name, last_name, age) VALUES ('John', 'Doe', 25);
INSERT INTO table_name (column1, column2, column3) VALUES (value1, value2, value3), (value4, value5, value6), ...;
示例:
INSERT INTO employees (first_name, last_name, age) VALUES ('John', 'Doe', 25), ('Jane', 'Smith', 30), ('Mike', 'Johnson', 35);
INSERT INTO table_name (column1, column2, column3) SELECT value1, value2, value3 FROM another_table;
示例:
INSERT INTO employees (first_name, last_name, age) SELECT first_name, last_name, age FROM another_table;
请确保在INSERT语句中提供与表定义中的列相对应的值,以及正确的数据类型和格式。