温馨提示×

mysql如何在表里添加数据

小亿
104
2024-02-27 14:10:11
栏目: 云计算

要在MySQL表中添加数据,可以使用INSERT INTO语句。语法如下:

INSERT INTO table_name (column1, column2, column3, …) VALUES (value1, value2, value3, …);

例如,如果要向名为"students"的表中添加一条记录,可以使用以下语句:

INSERT INTO students (first_name, last_name, age) VALUES (‘John’, ‘Doe’, 25);

这将在"students"表中添加一行数据,包括名为"John"、姓为"Doe"、年龄为25的学生信息。

0