Rather than locking a table (very unusual in Oracle), you can try simply misspelling a column name in your SQL statement. Oracle's compiler will throw an error for that.
select fred from global_name
*
ERROR at line 1:
ORA-00904: "FRED": invalid identifier