答案 0 :(得分:1)
SQL有SELECT TOP
命令,允许您检索一定数量的行。你可以SELECT TOP 1 name AS 'Oldest Person' FROM players ORDER BY age DESC
这将做的是:首先检索所有玩家,按年龄下降(最早的第一个)排序,然后取第一个。
答案 1 :(得分:1)
select * from players
where age = (select max(age) as Oldest_Player from players);
limit 1
答案 2 :(得分:0)
您可以使用如下的row_number:
$(document).ready(function () {
// Normal table definition
var table = $('#example').DataTable({
"data": testdata.data,
select:"single",
"columns": [
{
"className": 'details-control',
"orderable": false,
"data": null,
"defaultContent": '',
"render": function () {