Search
 
SCRIPT & CODE EXAMPLE
 

SQL

Oracle cx_Oracle example

# myscript.py

import cx_Oracle

# Connect as user "hr" with password "welcome" to the "orclpdb1" service running on this computer.
connection = cx_Oracle.connect(user="hr", password="welcome",
                               dsn="localhost/orclpdb1")

cursor = connection.cursor()
cursor.execute("""
        SELECT first_name, last_name
        FROM employees
        WHERE department_id = :did AND employee_id > :eid""",
        did = 50,
        eid = 190)
for fname, lname in cursor:
    print("Values:", fname, lname)
Comment

PREVIOUS NEXT
Code Example
Sql :: find in set in postgresql 
Sql :: insert into table sql 
Sql :: grab part of a string sql 
Sql :: mysql set column equal to another automatic 
Sql :: mysql select first 10 entries 
Sql :: change date in pivot table to month in sql server 
Sql :: parent child hierarchy in sql 
Sql :: Ms Sql set us timezone 
Sql :: mamp mysql password 
Sql :: mysql show create db 
Sql :: sql developer connect to sql server 
Sql :: table users 
Sql :: data types in sql 
Sql :: find the names of sailors who have reserved at least one boat 
Sql :: sqlalchemy filter by relationship 
Sql :: install sql server in ubuntu 20.04 
Sql :: postgres ERROR: relation "user" does not exist 
Sql :: how to get capital letter first in sql 
Sql :: import database from sql file 
Sql :: sql insert all 
Sql :: sql server port 1434 
Sql :: nested query 
Sql :: sql Not like operator 
Sql :: query params sql insert python f string 
Sql :: SQL Syntax of RIGHT JOIN 
Sql :: delete from table and truncate table 
Sql :: trncate table with relationships 
Sql :: mysql delete connected entries from database 
Sql :: SQlite script 
Sql :: sql multiple into 
ADD CONTENT
Topic
Content
Source link
Name
9+5 =