Environment: MySQL Sever 5.1 + SQL Server 2008 R2
Problem: The difference between MySQL and SQL Server in inserting data
First look at two pictures:
Mysql:
Sql server:
Create a table in MySQL, the primary key is growing, when inserting data, do not specify column names (for each field is assigned), the number of columns does not match, the column name after the specified normal inserted, and in SQL Server, the table's primary key is also an increase, do not specify a column name but can be inserted normally.
Attached SQL:
Mysql
CREATE TABLE Tb_user (ID int primary KEY auto_increment,name varchar
() not null,password varchar () not NULL);
Sql server
CREATE TABLE Tb_user (ID
int PRIMARY key identity,name varchar () not null,password varchar () is not null);
Summary: When inserting data using the command line, if you assign a value to each field, you specify the column name in MySQL, not in SQL Server. See the different database for SQL support different, usually pay more attention to these differences, and pay attention to summary. Also remind everyone, use the database, try not to use a graphical interface, use more, really will make you stupid, and the control of the SQL does not help. It is recommended that you use the command line to manipulate the database.
See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/database/MySQL/