我正在使用 SQLite Studio。當我創建一個表時,我可以看到并向它添加資料。我看不到臨時表。我的代碼:
create temporary table Books2
(
Title varchar(32) primary key,
year integer not null,
des varchar(750) null
);
insert into Books2
values
(
'CLRS',
'2000',
'A book in Algorithms'
);
如何訪問和查看 的資料Books2?
uj5u.com熱心網友回復:
您創建的臨時表存盤在另一個名為的資料庫temp中,該資料庫也是臨時的,將在當前連接關閉時被洗掉。
這個臨時資料庫的內容在 SQLite Studio 中是不可見的(據我所知)。
要訪問臨時表,請使用普通查詢并避免命名沖突,請temp在表名之前使用前綴:
SELECT * FROM temp.Books2;
如果需要,前綴main可用于當前資料庫的表名。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/510189.html
