How to check the correct oracle table name using sql / plsql

I need to check if a row contains the correct Oracle table name using sql / plsql. The criteria I found for the Oracle table name are as follows:

  • The table name must begin with a letter.
  • The table name cannot be longer than 30 characters.
  • The table name must consist of alphanumeric characters or the following special characters: $, _, and #.
  • The table name cannot be a reserved word.

Criteria 1,2,3 do not seem so difficult to solve. But what about point 4? What are my options, without actually trying to create a table with the given name, and then see if it succeeds or fails.

+3
source share
4 answers

Oracle , SQL. , SQL Injection.

dbms_assert.simple_sql_name Oracle PL/SQL .

v $reserved_words , .

+7

SQL v $reserved_words.

+5

SQL_RESERVED_WORDS, .

EDIT:

( ... SYNONYMN carpenteri)

0

This is a large enough list to check. Can you just add the default prefix to the tables and avoid these problems together? user_xxx

0
source

Source: https://habr.com/ru/post/1715714/


All Articles