DROP VIEW IF EXISTS v1;
SET @stmt_text = CONCAT('CREATE VIEW v1 AS SELECT (ID, PMID, Name, Address) FROM MyData
LEFT JOIN My_Parameters USING (ID)
WHERE MyData.ID > (newid) AND PMID > (PM_1)
PREPARE stmt FROM @stmt_text;
EXECUTE stmt;
注意:v1有100行和4列数据,实际选择有很多'连接'
DROP和SET语句执行时没有错误,但
PREPARE stmt FROM @stmt_text
Error Code: 1241. Operand should contain 1 column(s)
我该如何解决这个问题?