Home > database > New people for help, self-study small problems
New people for help, self-study small problems
Time:09-26
New people new to SQL statements, self-study in , there are two small question to answer,
In accordance with the format below and insert row 2 specifies the column name can but according to the format 1 tip failure is why
Format: 1 INSERT INTO table name VALUES (the value 1, 2,... )
Format 2: INSERT INTO table_name (column 1, 2,... ) VALUES (the value 1, 2,... )
2. The nested function MySQL is like Max (avg (chengji)) this nested function can't use, can only use a subquery to replace
I would appreciate your looking great god answer
CodePudding user response:
Columns do not match, which means your table may have five columns but you just insert the four columns
CodePudding user response:
There are other columns, you select *, Can be nested functions
CodePudding user response:
Although the first insert no problem, but require you to value field and complete corresponding data table fields; If the later data tables have change, may be wrong;
Suggested inserted in the second way, after the name of the table will write clear field.