how to get table id sequence postgres 1

how to get table id sequence postgres

SELECT table_name, column_name, column_default from
information_schema.columns where table_name='testing';

Here is what the above code is Doing:
1. We’re using the `.read_sql()` method to read the results of the SQL query into a dataframe.
2. We’re using the `.execute()` method to execute the SQL query.
3. We’re using the `.fetchall()` method to fetch all the results of the SQL query.

Let’s run the code and see what happens.

**Exercise**

how to get table id sequence postgres 2

– Run the code in the cell below.

**Answer**

how to get table id sequence postgres 2

– Run the code in the cell below.

**Expected output**:

Similar Posts