How do I get the primary key value AutoNumber for the insert data after the MySQL tutorial insert statement?
The method is very simple, the MySQL data with the mysql_insert_id ();
How to use:
Use kettle to insert the text file content into the mysql table under the Linux Virtual Machine. kettlemysql
I. decompress the kettle package
1. Copy the package to Linux.
Mysql driver package
2. decompress the zip package
Enter the command: unzip/software/pdi-ce-7.0.0.0-25.zip
You can delete the original package
+ ', ' ' "') ' + ' + ' + ' + ' + ' + ' + ' end 'Else ' NULL 'End as Col,a.colid,a.nameFrom syscolumns a WHERE a.id = object_id (@tablename) and A.xtype ) T ORDER by colidSelect @[email protected]+left (@sqlstr2, Len (@sqlstr2)-1) ' +left (@sqlstr1, Len (@sqlstr1)-3) + ') ' from ' [email Protected--Print @sqlstrEXEC (@sqlstr)SET NOCOUNT OFFEndGoSELECT * FROM systypesHow to use:EXEC Proc_insert your table nameSelect execute mode to display results in te
The table creation statement is as follows: createtableuser (idint, usernamevarchar (20), passwordvarchar (20); why is an error prompted when I insert a table like this? I am not an English version, so I cannot understand it. The prompt is "ming" or "insertintouservalues" (1... create table user (id int, username varch
Step 1th , open the word2007 document, click the Table button in the table group in the Insert Ribbon, and select Excel Spreadsheet in the Open menu, as shown in figure.
Figure Click the table button
Step 2nd , after inserting a blank Excel spreadsheet in the word2007 document, you can enter
The column names do not have to be the same. As long as you list the columns to be inserted in HH and the selected columns in the select from mm table one-to-one correspondence, of course, the Data Types on both sides should be compatible.Insert into hh (fielda, fieldb, fieldc) select fieldx, fieldy, fieldz from mmCopy codeThe Code is as follows:--- Update the data
Http://blog.csdn.net/diyoosjtu/article/details/7573620
First, create a table:
[SQL]
View plaincopyprint?
Create Table AAA (name varchar (10), user_id varchar (20 ));
create table aaa(name varchar(10),user_id varchar(20));
Then insert a value:
Be sure to convert the Data
Tags: Use mastergoif exists (select name from sysobjects where name = ' Sp_generate_insert_script ') Begin drop proc Sp_generate_i Nsert_script print ' old version of Sp_generate_insert_script dropped ' endgocreate procedure Sp_generate_insert_script @tablename_mask varchar = Nullasbegin DECLARE @tablename varchar (DECLARE) @tablename_max VA Rchar (+) DECLARE @tableid int DECLARE @columncount numeric (7,0) declare @columncount_max numeric (7,0) DECLARE @columnname varchar (DECL
From the Internet to find the method, but very good, recorded, but also to share the next ~ ~There is a table, city, with columns: cityid,cityname; change all data in this table to insert statementSelect ' Insert into TableName (cityid,cityname) VALUES (' ' +cityid+ ' ", ' +
Operating environment: There are table Game_list, fields: uid,score1,score2,seat_id,last_update;The incoming parameter is I_player_detail, the incoming value is multiple user ID, before score, after score, seat number, and each user's data is separated by a semicolon (;);Operation Objective: To insert the corresponding properties of each user into the correspondi
How to convert table data into INSERT statements when there is data in the tables(available with SQL Server R2 test from other people's perspective)CREATEPROC Spgeninsertsql @TableNameAsVARCHAR(100)AsDECLARE XcursorCURSORForSELECTNAME, XusertypeFrom syscolumnsWHERE(ID=object_id(@TableName))DECLARE @F1VARCHAR(100)DECLAR
sec)
Very time-consuming.
So I found another method.
Use PHP code to generate data and then import the data:
Then importLOAD DATA local INFILE 'e:/insert.sql' INTO TABLE tenmillion(`categ_id`, `categ_fid`, `SortPath`, `address`, `p_identifier`, `pro_specification`, `name`, `description`, `add_date`, `picture_url`,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.