오랜시간 PowerBuilder 사용하고 있으나 실상을 뒤집어 보면 아는게 별로 없는 허접한 개발자 맞다. 이제서야 정확한 이 옵션의 의미를 이해 했다는 것은 편의성이 가져다 주는 오만함을 심어 줬던것은 아니었을까. 역시나 내 무식함을 오늘도 한번 다시 느낀다.
Reference URL
http://infocenter.sybase.com/archive/index.jsp?topic=/com.sybase.help.pb_10.5.pbug/html/pbug/BHBHDIEG.htm
Example
Consider this situation: a DataWindow object is updating the Employee table, whose key is Emp_ID; all columns in the table are updatable. Suppose the user has changed the salary of employee 1001 from $50,000 to $65,000. This is what happens with the different settings for the WHERE clause columns:
If you choose Key Columns for the WHERE clause, the UPDATE statement looks like this:
UPDATE Employee
SET Salary = 65000
WHERE Emp_ID = 1001
This statement will succeed regardless of whether other users have modified the row since your application retrieved the row. For example, if another user had modified the salary to $70,000, that change will be overwritten when your application updates the database.
If you choose Key and Modified Columns for the WHERE clause, the UPDATE statement looks like this:
UPDATE Employee
SET Salary = 65000
WHERE Emp_ID = 1001
AND Salary = 50000
Here the UPDATE statement is also checking the original value of the modified column in the WHERE clause. The statement will fail if another user changed the salary of employee 1001 since your application retrieved the row.
If you choose Key and Updatable Columns for the WHERE clause, the UPDATE statement looks like this:
UPDATE Employee
SET Salary = 65000
WHERE Emp_ID = 1001
AND Salary = 50000
AND Emp_Fname = original_value
AND Emp_Lname = original_value
AND Status = original_value
피드 구독하기:
댓글 (Atom)
언제 부터 였던가 생각해보니 아르바이트 겸 외부 컨설팅을 의뢰 받고 맥북 프로를 처음 써봤을 때 부터 였던 것 같다. 지금은 거의 대부분의 작업을 맥으로 작업을 하다 보니 윈도우에서만 실행되는 일부 프로그램들 때문과 회사 내부 ERP프로그램이 윈도우 ...
-
웹/앱 리뉴얼 프로젝트를 진행 중에 내부에서 처리해야할 프로세스상 로직이 있었는데 오라클(데이터베이스) 단계에서 처리가 곤란하게 되어 외부서비스(웹)의 특정 URL/URI를 호출해야 되는 경우가 생겼다. 구글링으로 검색을 해도 상세히 설명 된 곳이 별...
-
env - Mac OS + anaconda from fbprophet import Prophet 아래와 같은 오류가 발생하는 경우 " ModuleNotFoundError: No module named 'fbprophet'...
-
주로 윈도우에서 RStudio를 사용할 때는 잘 몰랐는데 이동성 때문에 Mac Ari/Book에서 사용하는 경우 한글 깨짐현상이 발생 하기도 한다. 이럴때 해야 하는 여러가지 방법이 있는데 그중에 내가 사용한 내용을 공유하고자 한다. 우선은 RS...
댓글 없음:
댓글 쓰기