Tag:insert data
-
Example of SQL Server inserting data into temporary tables
Copy codeThe code is as follows: INSERT INTO #DirtyOldWIPBOM SELECT TOP (100) PERCENT dbo.WIP_BOM.Model, dbo.WIP_BOM.PartNumber,WIP_BOM.WIP FROM dbo.WIP_BOM left OUTER JOIN dbo.BOM_CHINA ON LTRIM(dbo.WIP_BOM.Model) = LTRIM(dbo.BOM_CHINA.Model) AND LTRIM(dbo.WIP_BOM.PartNumber) = LTRIM(dbo.BOM_CHINA.PartNumber) AND dbo.WIP_BOM.Qty = dbo.BOM_CHINA.Qty AND BOM_CHINA.WIP= WIP_BOM.WIP WHERE (dbo.BOM_CHINA.Model IS NULL) AND EXISTS(SELECT * FROM dbo.BOM_CHINA WHERE WIP = WIP_BOM.WIP AND LTRIM(Model) = LTRIM(WIP_BOM.Model)) So you […]
-
Three methods of mongodb inserting data
Insert() method:Here is the document that inserts a three field in the inventory collection: Copy codeThe code is as follows: db.inventory.insert( { _id: 10, type: “misc”, item: “card”, qty: 15 } ) In the real example, the document has a user specified value of 10, which must be unique in the inventory collection.Update() method:Call the […]
-
A simple example of PDO’s function of connecting database and inserting data in PHP
The example of this paper describes the function of PDO connecting database and inserting data in PHP. To share with you for your reference, as follows: create profile pdo_config.php <?php $db_type = “MySQL”; // database type $host = “localhost”; // host name $dbname = “test”; // database name $username = “root”; // user name $password […]
-
Oracle’s Three Ways of Batch Insertion of Data [Recommendation]
The first is: begin insert into tableName(column1, column2, column3…) values(value1,value2,value3…); insert into tableName(column1, column2, column3…) values(value1,value2,value3…); insert into tableName(column1, column2, column3…) values(value1,value2,value3…); … end; Second species: insert into tableName(column1, column2, column3…) values(value1,value2,value3…); insert into tableName(column1, column2, column3…) values(value1,value2,value3…); insert into tableName(column1, column2, column3…) values(value1,value2,value3…); The third (using intermediate tables): Insert into tableName (column1 (primary key), […]