Addfield: alter table [table name] addfield name smalldefault 0 addnumeric field, integer, the default value is 0.
Alter table [table name] add field name int defaults to 0 Add number field, long integer, and the default value is 0.
Alter table[ table name] Add field name single. The default value is 0. Add numeric field, single precision type, and the default value is 0.
Alter table [table name] Add field name double default 0 Add numeric field, double precision, and the default value is 0.
Alter table [table name] Add field name Tinyint. The default value is 0. Add numeric field, byte type, and the default value is 0.
Alter table [table name] addfieldnametext [null] addmemefield, [null] optional parameter.
Alter table [table name] add field name memo [null] add memo field, [null] optional parameters.
Alter table [table name] add field name varchar(N) [null] Increase the size of variable-length text field to n (1 ~ 255).
Alter table [table name] Add field name char [null] Increase the fixed-length text field size to 255.
Alter table[ table name] Add a field name Datetime Default function adds a date field, where the functions can be now (), date () and so on. A that represents the default value.
(The above is the most commonly used, and there are other attributes. Please refer to the following data type description. )
Delete field: alter table [table name] to delete the field name.
Modify the size of a variable-length text field: alter table [table name] alter field name varchar (n)
Delete table: delete table [table name]
Create table:
SQL = "create table [table &] ([field1,and set as primary key] int IDENTITY (1, 1) not null constraint primary key,"&;
"[field 2] varchar(50)," &;
"[field 3] singlefault 0," &;
"[field 4] varchar( 100) null," &;
"[field 5] smalldefault 0," &;
"[field 6] int default 0," &;
"[Field 7] Date Default Date (),"&;
"[field 8] int default 1)"
Connect. execute sql
Empty fields allow zero length.
Data table is one of the most important parts of database. The database is just a framework, and the data table is its essence. According to the classification of information, a database may contain several data tables.
Structured Query Language (SQL) is a special programming language and a database query and programming language, which is used to access data, query, update and manage relational database systems. It is also an extension of the database script file.
Structured query language is an advanced non-procedural programming language, which allows users to work on advanced data structures. It does not require users to specify the storage mode of data, nor does it require users to know the specific storage mode of data, so different database systems with completely different underlying structures can use the same structured query language as the interface for data input and management. Structured query language statements can be nested, which makes it very flexible and powerful. 1986 10, the American National Standards Institute standardized SQL and became the standard language of relational database management system (ANSI X3. 135- 1986) and became an international standard in 1987 with the support of the international organization for standards. Structured query language has five data types: character type, text type, numerical type, logical type and date type.