Skip to content
Advertisement

Tag: ansi-sql

Transaction Mode in SQL

I was reading through the BNF grammar for transaction statements and saw that transaction modes can be specified directly in the START TRANSACTION statement. Is there a difference in specifying transaction modes in START TRANSACTION vs SET TRANSACTION statements? Answer No difference. The SET TRANSACTION setting only affects the single next transaction to be started. Use SET SESSION to set

Extract substring from column based on values from another table in SQL

In SQL (let’s assume ANSI standard SQL), is it possible to extract a substring from one column, based on another table, and put this substring into another column? Example, from the following tables: The idea is to extract the location from the summary column and output the following: Answer You can do pattern matching: As commented by jarlh ANSI sql

Advertisement