Search notes:

SQL*Plus: EXECUTE

execute (or its abbreviation exec) embeds the given text into a begin … ; end; block (note the ; after the replaced text) and executes it.
exec dbms_output.put_line('Today is ' || to_char(sysdate, 'yyyy-mm-dd'))
exec can be used to assign a value to a bind variable:
variable num number
exec :num := 42
select * from xyz where id = :num; 
Using execute does not change SQL*Plus' buffer.

Peculiarity

If the init parameter nls_length_semantics is set to byte, then using exec to assign a text value to a bind variable truncates it to the length of the variable:
SQL> alter session set nls_length_semantics=byte;
SQL> var txt varchar2(5)
SQL> exec :txt := 'hello world'
SQL> print txt

TXT
--------------------------------
hello
Trying the same in SQLcl results in ORA-06502: PL/SQL: value or conversion error: character string buffer too small.

See also

The slash «command».
SQL*Plus

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1741078118, '18.118.82.168', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/Oracle/SQL-Plus/execute/index(67): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78