Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/68.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mysql 从self(own)表中选择_Mysql_Sql - Fatal编程技术网

Mysql 从self(own)表中选择

Mysql 从self(own)表中选择,mysql,sql,Mysql,Sql,这是我的查询:select uni_num from来自select uni_num limit 0,1,如“a%” 我知道这个查询不起作用,因为没有from语句,但我想使用limit而不使用from语句 INSQL中没有这样的查询吗?选择*from this.table~~AFAIK我知道没有类似的情况,因为当您在初始from子句中加入多个表时,此引用将指向什么?您只需要反转术语并使用子选择。。。其中“a%”如select uni_num from的来源;有很多解决方案,但要点是现在你什么都没

这是我的查询:select uni_num from来自select uni_num limit 0,1,如“a%”

我知道这个查询不起作用,因为没有from语句,但我想使用limit而不使用from语句


INSQL中没有这样的查询吗?选择*from this.table~~

AFAIK我知道没有类似的情况,因为当您在初始from子句中加入多个表时,此引用将指向什么?您只需要反转术语并使用子选择。。。其中“a%”如select uni_num from的来源;有很多解决方案,但要点是现在你什么都没有选择。子查询是它自己的特殊小范围,您可以从中返回一个值,例如,您想要使用的值,这些值可以在您的顶级from中使用。也就是说,这里需要一个解释:您是否试图过滤掉表中的特定值?对于您现在拥有的内容,需要使用子查询nor join,但是对于您尝试执行的操作,我可能会使用自联接。