MySQL检索具有限制的所有行 [英] Mysql retrieve all rows with limit

查看:46
本文介绍了MySQL检索具有限制的所有行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想检索限制为0,x的特定用户的所有行.

I want to retrieve all rows of a particular user with limit 0,x..

所以我只想问问有什么方法可以检索mysql中的所有行,而无需调用返回x&的count(id)的方法.而不会使现有功能过载,而该功能在查询&中根本没有限制具有string.Relace()功能.

So i just want to ask is there any way to retrieve all rows in mysql without calling a method which returns count(id) of x& without making an overload of existing function which does not have limit at all in query & withour string.Relace() functionality.

当我们选中显示所有复选框,然后显示taht表的所有行时,由于在内部mysql可能会使用

As internally mysql is might using this when we check show all check Box then all rows of taht table are displayed

推荐答案

简单的解决方案将int的最大范围发送给方法,即2147483647,因为它在mysql&中都相同. c#(4个字节)可以使用int.MaxValue.

Simple solution is sending int's max range to method i.e 2147483647 as it is same in both mysql & c# (4 bytes) can use int.MaxValue .

请参阅参考文献:

  1. http://dev.mysql.com/doc/refman/4.1/en/numeric-types.html
  2. https://docs.microsoft.com/zh-CN/dotnet/csharp/language-reference/builtin-types/integral-numeric-types .
  1. http://dev.mysql.com/doc/refman/4.1/en/numeric-types.html
  2. https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/integral-numeric-types.

这篇关于MySQL检索具有限制的所有行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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