成熟丰满熟妇高潮XXXXX,人妻无码AV中文系列久久兔费 ,国产精品一国产精品,国精品午夜福利视频不卡麻豆

您好,歡迎來到九壹網(wǎng)。
搜索
您的當(dāng)前位置:首頁MySQL返回影響行數(shù)的測試示例

MySQL返回影響行數(shù)的測試示例

來源:九壹網(wǎng)

found_rows() : select row_count() : update delete insert 注:需要配合相應(yīng)的操作一起使用,否則返回的值只是1和-1(都是不正確的值) 示例: drop database if exists `mytest`; create database `mytest`; use `mytest`; drop table if exists `MyTestTable

  found_rows() : select

  row_count() : update delete insert

  注:需要配合相應(yīng)的操作一起使用,否則返回的值只是1和-1(都是不正確的值)

  示例:

  drop database if exists `mytest`;

  create database `mytest`;

  use `mytest`;

  drop table if exists `MyTestTable`;

  create table `MyTestTable`(`ID` int ,`Name` varchar(10));

  insert into `MyTestTable`(`ID`,`Name`)

  select '1','role1' union all

  select '2','role2' union all

  select '3','role3';

  select row_count(); -- 輸出3(返回新添加的記錄數(shù)),[注:如果使用insert into...values只返回1]

  select * from `MyTestTable`;select found_rows(); -- 輸出3(返回選擇的行數(shù))

  update `MyTestTable` set `Name`='people';select row_count(); -- 輸出3(返回修改的行數(shù))

  delete from `MyTestTable`;select row_count(); -- 輸出3(返回刪除的行數(shù))

,

Copyright ? 2019- 91gzw.com 版權(quán)所有 湘ICP備2023023988號-2

違法及侵權(quán)請聯(lián)系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市萬商天勤律師事務(wù)所王興未律師提供法律服務(wù)