ไม้บรรทัดพลาสติกแข็ง? ยอมหักไม่ยอมงอ
ไม้บรรทัดพลาสติกอ่อน? โอนอ่อนไปตามแรง งอได้ตรงได้
ไม้บรรทัดเหล็ก? งอแล้วไม่อาจตรงได้อีก
คุณอยากไม้บรรทัดแบบไหน
วันศุกร์ที่ ๒๕ มีนาคม พ.ศ. ๒๕๔๘
วันพฤหัสบดีที่ ๒๔ มีนาคม พ.ศ. ๒๕๔๘
Creating a Sequence in PL/SQL
A sequence specifies a unique value. This one will give us the number 1 the first time we use it. Then it will give us 2 then 3 etc.. if for some reason the order gets messed up it will skip 20 numbers then give us the next number in the sequence.
CREATE SEQUENCE CustomerID_SEQ
INCREMENT BY 1
START WITH 1
MINVALUE 1
MAXVALUE 9999999999
NOCYCLE
NOORDER
CACHE 20;
from Abstractvb.com
CREATE SEQUENCE CustomerID_SEQ
INCREMENT BY 1
START WITH 1
MINVALUE 1
MAXVALUE 9999999999
NOCYCLE
NOORDER
CACHE 20;
from Abstractvb.com
Returning XML From SQL Server
This "article" is really more of a quick tip. You can easily return XML from any SQL Server Query by including the words FOR XML AUTO at the end of the query.
For example this SQL statment:
SELECT * from Customer FOR XML AUTO
Would return back XML data. It's simple!
from Abstractvb.com
For example this SQL statment:
SELECT * from Customer FOR XML AUTO
Would return back XML data. It's simple!
from Abstractvb.com
Selecting the Next available Sequence number in PL/SQL
The Dual table is a special table that exists in oracle, it keeps track of sequence information for you. You can query it to return the next number in your sequence like this:
Select CustomerID_SEQ from Dual;
from Abstractvb.com
Select CustomerID_SEQ from Dual;
from Abstractvb.com
Getting the Next ID in a SQL Server Identity
If you have a field in SQL Server that has an auto-incrementing field or an "Integer with Identity", you can retrieve the next ID in the sequence by simply calling @@IDENTITY.
For example this SQL statement:
Select @@IDENTITY
Would return back a single record that would contain the next number in the sequence.
from Abstractvb.com
For example this SQL statement:
Select @@IDENTITY
Would return back a single record that would contain the next number in the sequence.
from Abstractvb.com
สมัครสมาชิก:
บทความ (Atom)