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

前端之家收集整理的这篇文章主要介绍了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
原文链接:https://www.f2er.com/postgresql/196670.html

猜你在找的Postgre SQL相关文章