How can I make this DECLARE PROCEDURE working? I'm new to Oracle DB, coming from MS SQL Server.
I created this script:
DEFINE USER_NAME = &amp;1
DEFINE PASSWORD = &amp;2
DEFINE TABLESPACE = &amp;3

CONNECT &amp;DB_ADMIN/&amp;DB_PWD@//localhost:1521/&amp;DB_NAME

SET VERIFY OFF
SET SERVEROUTPUT ON
SET FEEDBACK OFF

DECLARE PROCEDURE Create_User
  ( userName IN VARCHAR2
  , password IN VARCHAR2
  , tSpace IN VARCHAR2
  ) AS
  dbCount INTEGER := -1;
  createStmt VARCHAR2(500);
BEGIN
  SELECT COUNT(*)
    INTO dbCount
    FROM CDB_USERS u
      INNER JOIN v$pdbs d ON u.CON_ID = d.CON_ID
    WHERE d.NAME = '&amp;DB_NAME'
      AND u.USERNAME = userName;

  IF dbCount &gt; 0
    THEN
      EXECUTE IMMEDIATE 'DROP USER ' || userName || ' CASCADE';
      DBMS_OUTPUT.PUT_LINE('User ' || userName || ' dropped.');
    END IF;

  createStmt := 'CREATE USER ' || userName || ' IDENTIFIED BY ' || password || ' DEFAULT TABLESPACE ' || tSpace || ' QUOTA UNLIMITED ON ' || tSpace;
  DBMS_OUTPUT.PUT_LINE('User about to be created:');
  DBMS_OUTPUT.PUT_LINE(createStmt);
  DBMS_OUTPUT.PUT_LINE('');


  DBMS_OUTPUT.PUT_LINE('Creating user ' || userName || ' ...');
  EXECUTE IMMEDIATE createStmt;
  DBMS_OUTPUT.PUT_LINE('Database ' || userName || ' successfully created.');

  END Create_User;

BEGIN
  Create_User('&amp;USER_NAME', '&amp;PASSWORD', '&amp;TABLESPACE');
  END;
  /

When I run it in SqlPlus, like this:
SQL&gt; DEFINE DB_NAME = 'MYDB'
SQL&gt; DEFINE DB_ADMIN = 'SA'
SQL&gt; DEFINE DB_PWD = 'pwd'
SQL&gt; @/db-install/sql/add-user.sql 'USERNAME' 'pwd' 'TSPACE'

I get this error message:
Connected.
DECLARE PROCEDURE Create_User
*
ERROR at line 1:
DECLARE
*
ERROR at line 1:
ORA-01918: user 'USERNAME' does not exist
ORA-06512: at line 19
ORA-06512: at line 36

Can someone please point me to the right direction? What am I doing wrong?
Your answer is appreciated.

EDIT
I have this exact same code in another script, and it's working fine there:
DEFINE DB_NAME = &amp;1
DEFINE DB_ADMIN = &amp;2
DEFINE DB_PWD = &amp;3

CONNECT &amp;DB_ADMIN/&amp;DB_PWD@//localhost:1521/&amp;DB_NAME

SET VERIFY OFF
SET SERVEROUTPUT ON
SET FEEDBACK OFF

BEGIN
  DBMS_OUTPUT.PUT_LINE('Adding tablespaces to database ...');
  END;
  /


--- Procedure: dropping and creating a given tablespace ---
DECLARE
  dbCount INTEGER;
  createStmt VARCHAR2(500);
  filePath dba_data_files.FILE_NAME%TYPE;
PROCEDURE Create_TS
...

EDIT 2
It doesn't make a difference if I put the variables between DECLARE and PROCEDURE:
DECLARE
  dbCount INTEGER := -1;
  createStmt VARCHAR2(500);
PROCEDURE Create_User
  ( userName IN VARCHAR2
  , password IN VARCHAR2
  , tSpace IN VARCHAR2
  ) AS
BEGIN

Connected.
DECLARE
*
ERROR at line 1:
ORA-01918: user 'USERNAME' does not exist
ORA-06512: at line 19
ORA-06512: at line 36
And that is a great example why you should never name your PL/SQL variables the same as column names.
set serveroutput on
DECLARE
  PROCEDURE Create_User
  ( userName IN VARCHAR2
  , password IN VARCHAR2
  , tSpace IN VARCHAR2
  ) AS
  dbCount INTEGER := -1;
  createStmt VARCHAR2(500);
BEGIN
  SELECT COUNT(*)
    INTO dbCount
    FROM DBA_USERS u
    WHERE u.USERNAME = userName;
  dbms_output.put_line('User count: ' || dbcount);
end;
begin
  create_user('abc', 'abc', 'abc');
end;
/

User count: 26

The u.USERNAME = userName filter is username = username, which returns all rows where username is not null.