How to add fields to a table with SQL statements?
General formula: the default value of Alter table[ table name] add[ field name] field attribute is optional parameter \ x0d \ Add field:Alter table[ table name] add field name smalldefault 0 Add numeric field, integer, and the default value is 0\x0d\ Alter table[ table name ]Add field name int default 0 add numeric field, long integer, with default value of 0 \ x0d \ Alter table[ table name] add field name single default 0 add numeric field, single precision, with default value of 0 \ x0d \ Alter table [table name] add field name double default 0 add numerical field, double precision, the default value is 0 \x0d\ Alter table [table name] add field name tinyintdefault 0 add numeric field, byte type, default value is 0 \ x0d \ Alter table [tablename] add fieldnametext [null] add a comment field, [null] optional parameter \ x0d \ x0d \ alter table [tablename] add fieldnamememo [null] add a comment field, [null] optional parameter \ X0d \ Alter table [table name] add field name varchar(N) [null] Increase the variable-length text field size to n (1~ 255) \ x0d \ x0d \ alter table [table name] Add field name char [null] Increase the fixed-length text field size to 255 \ x0d \ x0d. Alter table[ table name] Add field name Datetime Default function Add date field, where the function can be now (), date (), etc. , which means the default value \ x0d \ (the above is the most commonly used, and there are other attributes, please refer to the following data type description) \ x0d \ \ Delete field:alter table[ table name] dropfieldname \ x0d \ \ Modify the size of the variable-length text field: alter table[ table name] alter field name varchar (n) \ x0d \ x0d \ delete table: drop table [table name] \ x0d \ create a table. SQL = "create table [table &] ([field1,and set as primary key] int IDENTITY (1, 1) not null constraint primary key,"&; \x0d\\x0d\"[ field 2] varchar(50), "&x0d \ \ x0d \" [field 3] single default 0, "&; \ x0d \ \ x0d \ "[field 4]varchar( 100)null," &; \ x0d \ \ x0d \ "[field 5]small default 0," &; \x0d\\x0d\"[ field 6] int default 0," &; \x0d\\x0d\"[ field 7] date default date (), "&; \ x0d \ \ x0d \ "[field8] intdefault1)" \ x0d \ \ x0d \ conn.executesql \ x0d \ \ x0d \ indicates that the allowed length of a field containing null is zero.