-- 查詢最大id
select max(id) from "new_guess_like_article"; -- 63132
-- 查詢最大序列
select seq_new_guess_like_article.nextval from dual;
-- 插入資料
insert into "uwp_recommend"."new_guess_like_article"("id", "title", "author", "source", "abstract", "article", "small_image", "big_image", "pub_time", "used", "file_id", "text_type", "city", "delete_state", "remark", "spider_id") values
(seq_new_guess_like_article.nextval,
'特斯拉股價與機構抱團',
'王兆卿',
'21世紀經濟報道',
null,
'', null, null, to_date('2021-01-12 07:40:23', 'syyyy-mm-dd hh24:mi:ss'), '0', null, '15', null, '0', null, '64');
insert into "uwp_recommend"."new_guess_like_article"("id", "title", "author", "source", "abstract", "article", "small_image", "big_image", "pub_time", "used", "file_id", "text_type", "city", "delete_state", "remark", "spider_id") values
(seq_new_guess_like_article.nextval,
'蔚來宣布擬發行13億美元可轉換優先票據',
'21世紀經濟報道',
'21世紀經濟報道',
null,
'', null, null, to_date('2021-01-12 07:40:23', 'syyyy-mm-dd hh24:mi:ss'), '0', null, '15', null, '0', null, '64');
insert into "uwp_recommend"."new_guess_like_article"("id", "title", "author", "source", "abstract", "article", "small_image", "big_image", "pub_time", "used", "file_id", "text_type", "city", "delete_state", "remark", "spider_id") values
(seq_new_guess_like_article.nextval,
'國際油價基本面影響因素一覽',
'fx168',
'fx168',
null,
'', null, null, to_date('2021-01-12 07:40:23', 'syyyy-mm-dd hh24:mi:ss'), '0', null, '15', null, '0', null, '64');
python 執行插入語句
匯入sqlite驅動 import sqlite3 連線到sqlite資料庫 資料庫檔案是test.db 如果檔案不存在,會自動在當前目錄建立 conn sqlite3.connect test.db 建立乙個cursor cursor conn.cursor 執行一條sql語句,建立user表 c...
Oracle批量插入語句
insert all into test 12 id,name values id,name select id,name from process steps where name in pack功能測試 72hours pack功能測試 144hours pack功能測試 216hours pa...
oracle之多表插入語句
1 無條件insert 首先建一張表 再建立如下兩張表 create table emp1 id varchar2 4 name varchar2 50 sal number 7,2 create table emp2 id varchar2 4 name varchar2 50 money num...