# Behavior of asc table

**URL:** <https://forum.kx.com/t/behavior-of-asc-table/12593>\
**Category:** Community Support\
**Tags:** kdb-and-q\
**Created:** [July 4, 2022, 4:34pm UTC](https://forum.kx.com/t/behavior-of-asc-table/12593 "2022-07-04T16:34:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![darrenwsun1](https://avatars.discourse-cdn.com/v4/letter/d/8491ac/32.png) [@darrenwsun1](https://forum.kx.com/u/darrenwsun1)\
**Post date:** [July 4, 2022, 4:34pm UTC](https://forum.kx.com/t/behavior-of-asc-table/12593/1 "2022-07-04T16:34:00Z")

</div>

The doc on asc&nbsp;says&nbsp;

\>&nbsp;table, returns it sorted by the first non-key column and with the partitioned attribute set on it

But when there is only one non-keyed column, it’s actually the sorted attribute that is set.

q)meta asc ([c1:`a`b] c2:2 1) c | t f a --| ----- c1| s c2| j s q)meta asc ([c1:`a`b] c2:2 1; c3:01b) c | t f a --| ----- c1| s c2| j p c3| b

&nbsp;Perhaps an incomplete doc? Wonder if there is other edge case.&nbsp;

---

<div class="post-metadata">

**Author:** ![davidcrossey1](https://avatars.discourse-cdn.com/v4/letter/d/e68b1a/32.png) [@davidcrossey1](https://forum.kx.com/u/davidcrossey1)\
**Post date:** [July 5, 2022, 5:29am UTC](https://forum.kx.com/t/behavior-of-asc-table/12593/2 "2022-07-05T05:29:00Z")

</div>

Hi darrenwsun,

Yes, this is expected behavior and we will update the documentation to reflect.

Thanks for raising, I’ve created a GitHub issue for tracking.

Kind regards,

David
