SELECT * FROM employees;
INSERT INTO employees (employee_id, last_name, email, job_id, hire_date, salary)
VALUES (1234, 'Mascis', 'JMASCIS', 'IT_PROG', '14-FEB-2008', 9000);
UPDATE employees SET salary = 9100 WHERE employee_id=1234;
-- Run this first and make the change
SELECT * FROM employees WHERE employee_id=1234 FOR UPDATE;
-- Run this after the changes. I'm not sure this is necessary, but I do it.
COMMIT;
Daniele said:I wanted to understand why it is required rowid when I push the "lock" button in the results of a simple query in the "SQL Window"
Would you explain how you can make it work in Toad? I just installed Toad for Oracle Trial Version and I can't make it work.Hilarion said:It works in Toad for example.
Understand Editable Resultsets
A data grid is fully editable providing that the query itself returns a resultset that can be updated. Query statements must return the ROWID to be editable. For example:
Not Editable
select * from employee
Editable
select employee.*, rowid from employee
Notes:
You can substitute EDIT for SELECT * FROM. Toad translates it into the editable version of the statement. For example, edit employee returns the same result as select employee.*, rowid from employee.
Daniele said:In the sql window of Toad:
- Write the name of the table, press f4 (describe the table)
- In the new window go to the data tab
- Here you can view all records and modify them, without rownum (also in the export data)
Even Hilarion was trying to tell you that this thing is possible, but it is probably completely different.Thanks, but this is nothing like what Hilarion mentioned
I did not ask to include this functionality in a shortcut or "descibe" functionality.What you really want has nothing to do with fetching rownum or rowid. What you want is some kind of a shortcut to edit table data
This option can be useful for many people, certainly none of those known to you.this option may not be so important for most people
I apologize if sometimes confuse the word "rowid" with "rownum", I know the difference.It seems you still don't know the difference between rowid and rownum
No, it isn't true, if you know and use the toad surely you know that you can filter the results of the data displayed in the data tab, as in any select statement.A select statement can return just one row, but the data tab in TOAD will return all data.
Select s.ute, s.rowid
from serviz s
where s.name like ('%son%')
I have already talked about the benefits in previous posts... time of execution, number of windows opened, export of results......I don't see any advantage to hiding it
Did you hear this?In this post we were talking about the possibility of including implicitly the rowid when you want to change the results of a select statement
Is this correct?A select statement can return just one row, but the data tab in TOAD will return all data.
So, what I hear you say is, with TOAD, you can:
1. Write a table name in an editor.
2. Press F4 to describe the table.
3. Select the data tab.
4. Click the Edit query button to edit the SQL how you like.
5. This is like magic and saves lots of time!
With PL/SQL Developer, either you:
1. Write a table name in an editor.
2. CTL-Click the table name.
3. Click the query button at the bottom.
4. Edit the SQL how you like.
5. This is horrible, because it opened a new editor, shows the rowid and wastes time.
mike said:So, what I hear you say is, with TOAD, you can:
1. Write a table name in an editor.
2. Press F4 to describe the table.
3. Select the data tab.
4. Click the Edit query button to edit the SQL how you like.
5. This is like magic and saves lots of time!
With PL/SQL Developer, either you:
1. Write a table name in an editor.
2. CTL-Click the table name.
3. Click the query button at the bottom.
4. Edit the SQL how you like.
5. This is horrible, because it opened a new editor, shows the rowid and wastes time.
or
1. Write a table name in an editor.
2. Right Click and select Edit data.
3. Edit the SQL to how you like.
4. This also is horrible, because it opened a new editor, shows the rowid and wastes time.
Is that correct?
mike said:T-Gergely - A coworker showed me just yesterday. In the SQL Window preferences, there is an option "Include row number with export and copy". Uncheck that and the row number is not in the worksheet. I never noticed that before!
Do you have any suggestions for me about it?we were talking about the possibility of including implicitly the rowid when you want to change the results of a select statement.