Home > Software engineering >  Behind the SQL server in the specified column increase column
Behind the SQL server in the specified column increase column

Time:09-20


The alter TABLE WTD_TE_HIST add column 'TE_4_12 decimal (6, 2) AFTER' TE_4_11 ';
There is something wrong in this, I perform the news after 156, level 15, state 1, line 1
Keywords' column 'near a syntax error,
Please explain

CodePudding user response:

Try to get rid of the column,

CodePudding user response:

AFTER 'TE_4_11 take out,
Field is added to the end, it is not necessary to request the location of the new field, table structure changes, the new fields are behind heap,
Show the field requirement also should adjust your select statement fields in the order,
So, as long as the new field is not have to deal with, you don't need to change the original procedure basically can adapt to the table structure adjustment

CodePudding user response:

Can set the permissions of the system tables, adjust the order of the columns

CodePudding user response:

This setting is meaningless, and should get into the habit of all SQL statements are listed all of the fields, the business logic with table structure of fundamental field order it doesn't matter, if don't want to say with a select * to reduce the interface changes, as long as the front desk adaptive to change the database structure, then proposed a view, then select *, that can be used to view the isolation table structure changes the interface display,

CodePudding user response:

Using the database stored procedure,
  • Related