Skip to content

Tag: sql

Find common values in many tables

I have 5 tables and I want to find the common values between them in one column. The column name differs in two tables(account_number, account,account_id). select * from db.table1 as a INNER JOIN db….

Is it possible to sum up time field in SQL Server?

I have 3 time(0) column in 1 row. I want to calculate arrival-Time column automatically and this is result of the sum of Departure-Time + Duration is it possible with trigger or computed area method? thanks in advance Answer SQL Server does not support direct addition on time values; however, you can use date…

Select on value change

I have a table that looks like this in a MySQL database: I would like to select all lines where the Batch_Num is different from the previous value including the first one: Is there a keyword maybe to access the previous line to compare the to the current line? Or some other way to compare a line to the line