What is the equivalent of the Oracle “Dual” table in MS SqlServer?

前端 未结 4 2029
别那么骄傲
别那么骄傲 2021-01-01 08:10

What is the equivalent of the Oracle \"Dual\" table in MS SqlServer?

This is my Select:

SELECT pCliente,
       \'xxx.x.xxx.xx\' AS Serv         


        
4条回答
  •  失恋的感觉
    2021-01-01 09:03

    In sql-server, there is no dual you can simply do

    SELECT pCliente,
           'xxx.x.xxx.xx' AS Servidor,
            xxxx AS Extension,
            xxxx AS Grupo,
            xxxx AS Puerto
    

    However, if your problem is because you transfered some code from Oracle which reference to dual you can re-create the table :

    CREATE TABLE DUAL
    (
    DUMMY VARCHAR(1)
    )
    GO
    INSERT INTO DUAL (DUMMY)
    VALUES ('X')
    GO
    

提交回复
热议问题