[英]Exclude column in redshift spectrum sql queries
在我的表中有列 col1,col2 .....coln
我想要
select all columns except col1
而不是寫 select col2,col3.... coln from 我可以指定
select * from <table name> except col1
Select 除一列外的所有列
你可以做這樣的事情-
-- create a temporary copy of your table
SELECT * INTO temp_table FROM original_table;
-- drop the column you don't need
ALTER TABLE temp_table DROP COLUMN col1;
-- select all columns
SELECT * FROM temp_table;
-- drop the temporary table
DROP TABLE temp_table;
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.