microsoft sql server假字段

时间:2012-02-06 19:04:50

标签: php sql

无论如何,大家好 在sql查询中使字段通过php选择它? 例如

USE SRO_VT_ACCOUNT
IF EXISTS(SELECT UserID FROM [dbo].[_BlockedUser] WHERE UserID = 'ThElitEyeS1')
BEGIN
    DELETE FROM [dbo].[_BlockedUser] WHERE UserID = 'ThElitEyeS1';
        PRINT 'EXIST' AS status

END
ELSE
BEGIN
    PRINT 'NOT EXIST' AS status
END

然后通过php选择它

while ($row = mssql_fetch_array(...)) {
   echo $row["status"];
}

有可能吗?

1 个答案:

答案 0 :(得分:2)

试试这个:

SELECT 'EXIST' AS field_name