GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Tech FAQs  >  SQL
Go To First  |  Previous Question  |  Next Question 
 SQL  |  Question 181 of 190    Print  
Lock Row of a Table using SQL
How to lock a particular row of a table using SQL?


  
Total Answers and Comments: 1 Last Update: June 20, 2008     Asked by: haritha2212 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
June 20, 2008 07:02:35   #1  
krishnaindia2007 Member Since: September 2007   Contribution: 870    

RE: Lock Row of a Table using SQL

INSERT , UPDATE, DELETE operations implicity lock rows of a table that satisfies the condition.

Explicitly you may lock a table using for update of as follows

SELECT * FROM EMP
WHERE EMPNO = 7369
FOR UPDATE OF SAL NOWAIT

It will lock single row of emp table having employee number 7369.


 
Is this answer useful? Yes | No

 Related Questions

In SQL. (DB2)there is one Dept table and other Emp tableQuestion- select Emp Name from Emp whose Dept No. is not in Dept table and it is present in Emp table Plz tell the Query?
Read Answers (8) | Asked by : dinesh

Latest Answer : select distinct (a.sal) from emp a where &n=(select count (distinct(b.sal)) from emp b where a.sal
Read Answers (14) | Asked by : ramaprasad

Hey there SQL MASTERS, here are some questions i was posed in an interview/assessment thing, dunno how well i did....Coud u answer these questions? i dont know how easy/difficut they are for u, all i know is that i had SERIOUS trouble with them! thanks alot!EMPLOYEEEmployee_id number NOT NULL (Primary Key)Employee_name VarChar(30) NOT NULL Dept_id number NOT NULL (Foreign Key to DEPARTMENT)Manager_id number NOT NULL (Foreign Key to EMPLOYMENT)Salary number
Read Answers (6) | Asked by : zen

Latest Answer : In Trigger there is a special Table Called INSERTD. it takes the value from transation log.In the After Insert Trigger....SELECT Id,Name FROM INSERTEDyou can catch these values in a variable. ...
Read Answers (4) | Asked by : Mahendra raja

Latest Answer : delete from table_name1 t1 where exists   ( select * from table_name1 t2           where t2.keyvalue1=t1.keyvalue1                   ...
Read Answers (14) | Asked by : Anita

Latest Answer : If you are looking for an SQL server 2005 query then the following:SELECT     rowidFROM         empWHERE     (rowid =                          (SELECT     COUNT(*) AS Expr1                            ...
Read Answers (12) | Asked by : A

Latest Answer : select * from (select * from(select * from emp order by sal desc) where rownum ...
Read Answers (43) | Asked by : suman

How to get fifth maximum salary from the table with out using TOP keywork(without any keywords) in sql server 2000Can you please guide me about this?
Read Answers (8) | Asked by : satchin

I am writing a script to update a value in an Oracle table. The script has a 'From' clause which Oracle does not like. Is there another way to write this since I am bringing data from 3 different tables.ThanksSamir
Read Answers (1) | Asked by : Samir

Latest Answer : select * from tab; ...


 Sponsored Links

 
Related Articles

ODP.NET - Populating a Dataset with a Single Data Table

ODP NET Populating a Dataset with a Single Data Table A dataset is simply a group of data tables These data tables can be identified with their own unique names within a dataset You can also add relations between data tables available in a dataset mosgoogle The following code gives you the details o
 

jQuery Table Row Finished Code

jQuery Table Row Finished Code The Finished Code Our second example page has demonstrated table row striping highlighting tooltips collapsing expanding and filtering Taken together the JavaScript code for this page is mosgoogle geshibot lang php" document ready function var highlighted
 

jQuery Expanding and Collapsing Table Rows

jQuery Expanding and Collapsing Table Rows The expanding and collapsing behavior added earlier also conflicts with our filters If a section is collapsed and a new filter is chosen then the matching items are displayed even if in the collapsed section Conversely if the table is filtered and a section
 

jQuery Table Row Filtering

jQuery Table Row Filtering Earlier we examined sorting and paging as techniques for helping users focus on relevant portions of a table s data We saw that both could be implemented either with server side technology or with JavaScript Filtering completes this arsenal of data arrangement strategies B
 

jQuery Collapsing and Expanding Table Rows

jQuery Collapsing and Expanding Table Rows When large sets of data are grouped in tables as each year s set of articles are in our News page collapsing or hiding a section s contents can be a convenient way to get a broad view of all of the table s data without having to scroll so much mosgoogle To
 

jQuery Table Manipulation

Learning jQuery Table Manipulation By Karl Swedberg Jonathan Chaffer Better Interaction Design and Web Development with Simple JavaScript Techniques Learning jQuery packtpub com jQuery book Table Manipulation Let em wear gaudy colors Or avoid display Devo Wiggly World" In the first si
 

SQL Table Commands

SQL Table Commands Overview As mentioned previously in this series of SQL articles, databases are primarily composed of tables. The “columns and rows” structure of the table allows data to be efficiently inserted, manipulated, updated, and deleted from the database. The three mos
 

Table space - Important concept of Database

Table space Important concept of Database Wondering what a Table space is Database is divided into one or more logical storage units known as table space The table space is created by database administrator After the table space gets created by administrator tables can be created by users in their
 

WebSphere V5.0 : Defining a table

WebSphere V5 0 Defining a table In this tutorial you will learn about WebSphere V5 0 Defining a table Steps to define a table in your database mosgoogle Tables are logical structures maintained by the database manager Tables are made up of columns and rows You can define tables as part of your data
 

Oracle Apps Table Registration API

Oracle Apps 11i Free Training Table Registration API This chapter provides you with information you need to register tables to be used in Oracle Alerts and Flexfields with Oracle Applications We will be learning about Procedures in the AD DD Package Procedure REGISTER TABLE Procedure REGISTER COLUMN
 





About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape