General: ALTER TABLE [table name] add [Field name] Field properties default default is optional parameter increment field: ALTER TABLE [table name] Add field name smallint default 0 Add Number field, int, Default value is 0 alter table [table name] Add field name int default 0 Add Number field, Long integer, default value 0alter table [table name] Add field name single default 0 Add Number field, one type, default Value 0 alter table [table name] Add field name double default 0 Add Numeric field, double type, default value 0alter table [table name] Add field name Tinyint default 0 Add Number field, byte type, The default value is 0 alter table [table name] Add field name text [NULL] Add Memo field, [NULL] optional parameter ALTER TABLE [table name] Add field name MEMO [NULL] Add Memo Type field [NULL] optional parameter & Nbsp;alter table [table name] Add field name varchar (n) [null] increase variable length text type field size N (1~255) ALTER TABLE [table name] Add field name char [null] increase fixed length text field size fix to 255 alter table [table name] Add field name the datetime default function increases the date Type field, where the function can be now (), date (), and so on, representing the default value (which is most commonly used, and other properties, which can be referenced by the following data type Delete field: ALTER TABLE [table name] Drop field name Modify size of variable-length text field: ALTER TABLE [table name] ALTER field name varchar (N) Delete table: drop tables [table name]& Nbsp; sql query table, all field names of the table
SQL SERVER
View all table names:
Select name from sysobjects wheretype= ' U '
All field names for the query table:
Select name from syscolumns whereid=object_id (' table name ')
SELECT * FROM Information_schema.tables
SELECT * FROM Information_schema.views
SELECT * FROM Information_schema.columns
ACCESS
View all table names:
Select name from Msysobjects where type=1 and flags=0
Msysobjects is a system object, which is hidden by default. It can be displayed by tools, options, views, displays, system objects, and so on.
Oracle
Select cname from col where tname= ' Zw_yingyez '
Select column_name from User_tab_columns wheretable_name= ' Zw_yingyez '
Query table field number
Select COUNT (column_name) from User_tab_columns wheretable_name= ' table name ';
SQL Add table fields and SQL query tables, all field names for the table