Search
 
SCRIPT & CODE EXAMPLE
 

SQL

postgres add prefix to primary key

CREATE TRIGGER test BEFORE INSERT ON name_of_table
FOR EACH ROW SET row_nanme = CONCAT('prefix-', primary_key);
Comment

PREVIOUS NEXT
Code Example
Sql :: postgres between dates 
Sql :: SQL SELECT TOP Equivalent in oracal 
Sql :: sql order 
Sql :: psql concat string and int 
Sql :: postgres drop all tables 
Sql :: select multiple tables mysql 
Sql :: drop domain postgresql 
Sql :: mysql copy table rows from one database to another 
Sql :: check if user defined table type exists in sql server 
Sql :: export database with data sql server 
Sql :: oracle undo usage per session 
Sql :: sql order by except one row 
Sql :: SQL COMO ALTERA NOME DE TABELA 
Sql :: acual month sql 
Sql :: h2 auto increment and unique 
Sql :: how to get last element sql 
Sql :: copy data from one database to another 
Sql :: how to convert null to float in mysql 
Sql :: creashed table mysql 
Sql :: oracle drop program 
Sql :: MySQL error code 2068 
Sql :: mysql earlier than date 
Sql :: local pg_sql to heroku pg_sql 
Sql :: drop specific row postgresql 
Sql :: oracle sql procedure return value 
Sql :: update a column with another column in same table mysql 
Sql :: auto increment psql not primary key 
Sql :: update view sql 
Sql :: C# mysql update statement set value to null 
Sql :: alter in mysql 
ADD CONTENT
Topic
Content
Source link
Name
2+7 =