本文介绍了Oracle的"Dual"等效项是什么? MS SqlServer中的表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

MS SqlServer中的Oracle"Dual"表的等效项是什么?

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

这是我的Select:

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

推荐答案

sql-server中,没有dual您可以简单地完成

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

但是,如果您的问题是因为您从Oracle转移了一些引用dual的代码,则可以重新创建表:

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

这篇关于Oracle的"Dual"等效项是什么? MS SqlServer中的表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-21 01:02