.NET Logo
Welcome Guest Search | Active Topics | Members | Log In | Register

อยากทราบวิธีการเขียน store procedure Options · View
Platong
Posted: Saturday, October 04, 2008 5:23:24 PM
Rank: มือฝึกหัด
Groups: Member

Joined: 10/4/2008
Posts: 1
Location: Bangkok

ต้องการทราบวิธีการเขียน store procedure เพื่อทำการ insert/update/delete ข้อมูลใน sql server 2005 

ไม่ทราบว่าต้องเริ่มจากตรงไหนและมี syntax อะไรที่จำเป็นต้องเขียน นอกเหนือจากภาษา SQL

fronzen
Posted: Monday, October 06, 2008 9:25:13 AM
Rank: มือสมัครเล่น
Groups: Member

Joined: 4/22/2008
Posts: 18

create proc <ชื่อ store ที่จะเรียกใช้>  หรือ create procdure <ชื่อ store ที่จะเรียกใช้>

(@<ชื่อ parameter1>,@<ชื่อ parameter2>,...)

as

select ........................................

from

where <column1> = @parameter1 and <column2> = @parameter2  ..............

(order by <column1>,<column2>)

(group by <column1>,<column2>,...................)

(having .............................................)

 (sql ธรรมด๊า ธรรมดา)

แต่ถ้าต้องการทำการส่ง parameter ที่มี condition ด้วย  รู้สึกว่าต้อง ศึกษาภาษา basic ด้วยนะครับ อยากรู้ขุดต่อเลยครับ อิอิ

Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

YAFVision Theme Created by Jaben Cargman (Tiny Gecko)
Powered by Yet Another Forum.net version 1.9.1.8 (NET v2.0) - 3/29/2008
Copyright © 2003-2008 Yet Another Forum.net. All rights reserved.


Sponsored by