Sql-server – the equivalent of the Oracle “Dual” table in MS SqlServer

dual-tableoraclesql server

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

This is my Select:

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

Best Answer

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