Home > database >  How to use the batch change the database structure, add data?
How to use the batch change the database structure, add data?

Time:09-19

The user's computer operation level is not high, how can I want to send him a batch file direct execution, finish to modify the structure of the database table, add record operations, such as
Such as:
1. Modify the structure of the table test1 and on the basis of original increase a field, the field name: sum, type: float, length: 8
2. The table test2 add the following record:
The name age sex
Zhang SAN 20 male
Li si 40 female

Best can provide complete batch file content, thank you.

CodePudding user response:

1,
 ALTER TABLE test1 ADD sum FLOAT (8) 


2,
 INSERT INTO test2 
(
The name,
Age,
Sex
)
VALUES
(' zhang ', '20', 'male'),
(' bill ', '40', 'woman');

CodePudding user response:

What I want is. Bat that can perform file directly, easy-to-install, not into the database operation,

CodePudding user response:

You write a desktop application, directly under the customer a few can finish, is it not better?

CodePudding user response:

BAT the SQL to perform, even write programs, also to configure the SQL connection information, such as SQL server's IP address, user name and password, and database name, unless the machine is the server, save the SQL statement is commonly. SQL file format, you fool type operation idea, and database security strategy,
  • Related