惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

W
WeLiveSecurity
The Last Watchdog
The Last Watchdog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
G
Google Developers Blog
博客园 - 叶小钗
雷峰网
雷峰网
人人都是产品经理
人人都是产品经理
博客园_首页
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 三生石上(FineUI控件)
Help Net Security
Help Net Security
Cloudbric
Cloudbric
AI
AI
N
News | PayPal Newsroom
博客园 - 聂微东
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 【当耐特】
Forbes - Security
Forbes - Security
美团技术团队
Stack Overflow Blog
Stack Overflow Blog
SecWiki News
SecWiki News
H
Heimdal Security Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
MyScale Blog
MyScale Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Proofpoint News Feed
S
Security @ Cisco Blogs
Google DeepMind News
Google DeepMind News
V
V2EX
大猫的无限游戏
大猫的无限游戏
阮一峰的网络日志
阮一峰的网络日志
S
Security Affairs
L
LangChain Blog
The Hacker News
The Hacker News
F
Full Disclosure
aimingoo的专栏
aimingoo的专栏
Hacker News - Newest:
Hacker News - Newest: "LLM"
腾讯CDC
Webroot Blog
Webroot Blog
A
About on SuperTechFans
H
Hacker News: Front Page
Cyberwarzone
Cyberwarzone
WordPress大学
WordPress大学
L
LINUX DO - 热门话题
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Attack and Defense Labs
Attack and Defense Labs
M
MIT News - Artificial intelligence

博客园 - niceboy

Redhat Linux 7.3 虚拟机通过USB挂载NTFS格式的移动硬盘 自己写的一个记录日常事务的小软件,也可以作为密码保险箱和提醒工具 访问IIS元数据库失败解决办法 海事卫星通信 关于GPS车载终端的研究 操作或事件已被禁用模式阻止 售前工程师的来世今生(转载自IT售前论坛的经典基础知识)【转】 用Oracle Instant client 打包Oracle客户端 关于FTP端口【转】 轻松掌握使用 SQL Server 浏览器,解决SQL Server 2005跨网段不能连接问题 论《金瓶梅》与项目管理中人际关系协调 软件开发质量管理层次模型 软件开发中项目需求管理简述 软件测试的基本概念和方法 Web应用程序的整体测试 VSS使用手册 .Net 2.0新功能:重构(Refactoring)(4) .Net 2.0新功能:重构(Refactoring)(3) .Net 2.0新功能:重构(Refactoring)(2)
Oracle数据库中 编号自动增长的实现
niceboy · 2009-03-11 · via 博客园 - niceboy

最近做一个项目,又要用Oracle了,其实我对Oracle并没有好感,可能是我用习惯了MS的东西。

其中有个问题 ,就是要在数据表里插入数据的时候实现像SQL Server和Access一个的自增编号,多好的功能啊,Oracle为什么不给实现一下呢,只能自己想办法了。

从网上查到一些资料,简单记录一下,希望对大家有帮助。

首先用正确的用户登录,用SQL语句创建自增长的序列

CREATE SEQUENCE buiding_id_seq
NOCYCLE
MAXVALUE 99999999

START WITH 1;

INCREMENT BY 1

这样就建立一个像sql下的自动编号列。

可是我在插入数据的时候insert into Buiding values(buiding_id_seq.nextval,'测试','测试')

就这么简单,一切OK啦