--查询数据并赋值
WITH brandid AS (
SELECT
id
FROM brand
WHERE code='bb'
)
--SELECT * FROM brandid;
--插入数据
insert into game(brand,game_code,attributes,category,supported_platform,create_at,update_at)
SELECT id,'gamecode',0,'gamecatetory','platform',
'2023-07-24 12:24:51.477876','2023-07-24 12:24:51.477876' FROM brandid;
--按赋值的条件查询数据
select * from game where brand=(select id from brandid);
文章展示了使用SQL进行数据操作的过程,包括从brand表中查询特定品牌ID,插入新记录到game表,以及按照品牌查询游戏数据。
975

被折叠的 条评论
为什么被折叠?



