未定义的兰特表达? [英] Undefined rand expression ?

查看:74
本文介绍了未定义的兰特表达?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿伙计们,我不明白这个sql语句有什么问题......有什么想法吗?


SELECT *

FROM Temp

ORDER BY rand();

Hey guys, i don`t understand whats wrong with this sql statement....Any ideas ?

SELECT *
FROM Temp
ORDER BY rand();

推荐答案

Heya,redskycorp。


没有什么事情发生在我身上。也许在反引号中包含你的表名会有所帮助。此外,通常在ORDER BY RAND()时,您也倾向于限制:

Heya, redskycorp.

Nothing jumps out at me. Maybe enclosing your table name in backticks will help. Also, usually when you ORDER BY RAND(), you tend to also LIMIT:

展开 | 选择 | Wrap | 行号


我做过这....


SELECT *

FROM`Temp`

ORDER BY rand()

LIMIT 2;


现在它在查询表达式''ran()LIMIT 2''中说语法错误(缺少运算符)....
I did this....

SELECT *
FROM `Temp`
ORDER BY rand()
LIMIT 2;

Now it says syntax error (missing operator) in query expression '' ran() LIMIT 2 ''....


尝试在其上放置 where 语句...


例如:

Try to put a where statement on it...

For example:

展开 | 选择 | Wrap | 行号


这篇关于未定义的兰特表达?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆