You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

创建artwork表后查询显示no rows selected,为何无数据返回?

Why select * from artwork Returns "no rows selected"

Hey, no need to stress—this is totally normal behavior, not an error! Let me break down what's happening here:

  • Creating a table only sets up its structure
    When you ran create table artwork (...) and got the Table created confirmation, you just built an empty "shell" for your data. The table has all the columns you defined (artwork_id, barcode, etc.) and the primary key rule in place, but there are zero actual records stored in it yet.

  • Your SELECT query is working exactly as it should
    select * from artwork tells the database to fetch every row in the table. Since you haven't added any data to the table yet, there's nothing to return—hence the no rows selected message.

If you want to see data show up, you need to insert records into the table using an INSERT statement. Here's a quick example to get you started:

INSERT INTO artwork (artwork_id, barcode, title, description)
VALUES (1, 'ART00001234567890', 'Mountain Landscape', 'Acrylic painting of alpine peaks at dawn');

Run that, then re-execute your SELECT query, and you'll see the row you just added!

内容的提问来源于stack exchange,提问作者agam

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.25 07:14:26