LcfSQL/커서/트랜잭션 계약 맵 작성 (BAIS-SPRING-SQL-001)
This commit is contained in:
parent
575878b93f
commit
7e1a43b20f
1 changed files with 23 additions and 0 deletions
23
sql/lcfsql_examples.sql
Normal file
23
sql/lcfsql_examples.sql
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
-- LcfSQL 예제 쿼리
|
||||
|
||||
-- 사용자 선택
|
||||
SELECT * FROM Users WHERE id = ?;
|
||||
|
||||
-- 주문 배열 선택
|
||||
SELECT * FROM Orders WHERE userId = ?;
|
||||
|
||||
-- 제품 삽입
|
||||
INSERT INTO Products (name, price) VALUES ('New Product', 19.99);
|
||||
|
||||
-- 사용자 업데이트
|
||||
UPDATE Users SET name = 'Updated Name' WHERE id = ?;
|
||||
|
||||
-- 주문 삭제
|
||||
DELETE FROM Orders WHERE id = ?;
|
||||
|
||||
-- 커서 열기
|
||||
DECLARE cursor CURSOR FOR SELECT * FROM Transactions WHERE userId = ?;
|
||||
OPEN cursor;
|
||||
|
||||
-- 커서에서 데이터 가져오기
|
||||
FETCH NEXT FROM cursor;
|
||||
Loading…
Add table
Add a link
Reference in a new issue