SELECT from nothing?

前端 未结 14 2184
难免孤独
难免孤独 2020-12-24 04:03

Is it possible to have a statement like

SELECT \"Hello world\"
WHERE 1 = 1

in SQL?

The main thing I want to know, is can I SELECT f

14条回答
  •  攒了一身酷
    2020-12-24 04:46

    I'm using firebird First of all, create a one column table named "NoTable" like this

    CREATE TABLE NOTABLE 
    (
      NOCOLUMN              INTEGER
    );
    INSERT INTO NOTABLE VALUES (0); -- You can put any value
    

    now you can write this

    select 'hello world' as name
    

    from notable

    you can add any column you want to be shown

提交回复
热议问题