Home > Enterprise >  Is there a functionality similar to ctid in postgres for MySQL/Snowflake or other databases?
Is there a functionality similar to ctid in postgres for MySQL/Snowflake or other databases?

Time:03-18

I have been trying to remove duplicates from the table but I need more of a generalized way of doing it. There are numerous ways to do it if the table has a unique identifier like row ID. But otherwise, it seems to be very difficult and different for different databases.

I even explored CTE (Common Table Expressions) to do the same but seems that databases do not allow the use of CTE followed by DELETE clause (at least what I saw with MySQL and Snowflake).

But in PostgreSQL, there seems to be a way in which we can achieve this without necessarily having any unique identifier. This is through the use of ctid, a system column in PostgreSQL. I am curious if there is a similar functionality like ctid for other databases especially MySQL and Snowflake is what I am interested in currently.

CodePudding user response:

I am curious if there is a similar functionality like ctid for other databases especially MySQL and Snowflake is what I am interested in currently.

There is no CTID in Snowflake.

  • Related