微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

postgresql 中怎样在select中直接得到行号转自:http://topic.csdn.net/u/20070116/11/7c907484-6bb8-4c6d-97b3-243aacb

test=# create temp sequence test_seq;   
CREATE SEQUENCE
test=# select nextval('test_seq'),name from test;
 nextval | name   
---------+------------
  1 | name text  
  2 | zms text  
  3 | smz text  
  4 | name text  
  5 | zms text  
  6 | smz text  
  7 | name text  
  8 | zms text  
  9 | smz text

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐