当前位置:网站首页>Sqlite A列数据复制到B列
Sqlite A列数据复制到B列
2022-07-31 05:15:00 【为今天而努力】
测试数据:
alter table test add column_1 int;
insert into test (column_1) values(1),(2),(3);
实际操作:
// 添加新列
alter table test add column_2 int;
update test set column_2 = column_1; // 将column_1的数据 copy 到 column_2;
// 重置原有列数据。
update test set column_1 = 0;
大功告成!!!
边栏推荐
- 阿里云中mysql数据库被攻击了,最终数据找回来了
- mysql password modification method in Linux (pro-test available)
- 纯shell实现文本替换
- Getting to know regular expressions
- (Crypto essential dry goods) Detailed analysis of the current NFT trading markets
- [uiautomation] Get WeChat friend list (stored in txt)
- 腾讯云GPU桌面服务器驱动安装
- sql 添加 default 约束
- SQL注入中数据库的判断
- 代码块、Package,Import,封装(第六天)
猜你喜欢
随机推荐
UiBot存在已打开的MicrosoftEdge浏览器,无法执行安装
数据库 | SQL增删改查基础语法
[windows]--- SQL Server 2008 super detailed installation tutorial
局部变量成员变量、引用类型、this,static(第五天)
MySql创建数据表
【云原生】开源数据分析 SPL 轻松应对 T+0
C language tutorial (1) - preparation
动态规划(一)| 斐波那契数列和归递
工件SSMwar exploded 部署工件时出错。请参阅服务器日志了解详细信息
Error: Cannot find module 'D:\Application\nodejs\node_modules\npm\bin\npm-cli.js'
Gradle sync failed: Uninitialized object exists on backward branch 142
Markdown 帮助文档
How to distinguish big and small endian in C language
NFT:数字所有权的核心
Yuan prospect and four track of the universe
Redis:简单实用
SQLite 查询表中每天插入的数量
sqlmap injection tutorial common commands
this指向问题
MySQL高级语句(一)