💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
[TOC] ## 增删改查 实例为对数组的操作 ``` // 创建表 CREATE TABLE "sal_emp" ( "name" text , "pay_by_quarter" int[], "schedule" text[][] ) // 插入 insert into sal_emp VALUES('a','{1,2,3}','{{"a","b","c"},{"d","e","f"}}') // 更新,注意: postgresql 数组索引从1开始 update sal_emp set pay_by_quarter[1]=123 // 获取 select pay_by_quarter from sal_emp // {123,2,3} select pay_by_quarter[1] from sal_emp // 123 ``` ## SELECT INTO ,从一张表插入另一张 语法 ``` SELECT column_list INTO [ TEMPORARY | TEMP ] [ TABLE ] new_table [other_clauses] ``` 示例 ``` SELECT title INTO TABLE film_ranting_g_title FROM film WHERE rating = 'G'; ``` 把评分为G 的表迁移到另一张表中