如何在SQL Server表中查找第3行和第5列记录 [英] How to find a 3rd row and 5th column record in a SQL server table

查看:538
本文介绍了如何在SQL Server表中查找第3行和第5列记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

先生

i希望使用sql server 2008查找表中第3行和第5列的记录。我是如何找到它的。



我尝试了什么:



i使用行号()

解决方案

SQL表是一组记录的集合,它表示记录不是任何预定义的序列,并且每个记录都是唯一的。因此,根据sql表中的特定行和列请求记录是没有意义的。您应该指明列名而不是列号,然后从符合某些条件(例如ID,product_code,name等)的行中检索这些列,而不是行号。


sir
i want to find record of 3rd row and 5th column in a table using sql server 2008. how i found it.

What I have tried:

i tried different code using row number()

解决方案

SQL table is a collection of a set of records, it means the records are not in any predefined sequence and each of them is unique. Thus, it makes no sense to ask for a record based on specific row and column from a sql table. You should indicate the column names instead of column numbers, then retrieve these columns from rows that meet certain criteria such as ID, product_code, name, etc, instead of row numbers.


这篇关于如何在SQL Server表中查找第3行和第5列记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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