Skip to content
Advertisement

Tag: database

SQL union grouped by rows

Assume I have a table like this: col1 col2 col3 col4 commonrow one two null commonrow null null three How to produce a result to look like this: col1 col2 col3 col4 commonrow one two three Thanks Answer like this, you can group by col1 and get the maximum in each group:

Query Java doesn’t execute

I’m trying to execute a query on eclipse at my Java program, but it always exit with a exception and don’t execute the query, I read a lot of posts here but no one of them could help me with this. …

Out of Range Error while inserting into a MySQL decimal column

I have this tabular structure: I get an error when i try to insert a specific set of value, query with those values is as below: For longitude with value -161.9722021 it is throwing me an error, values less than 100 value were successfully inserted. I don’t see the value being out of range, the value i am giving in

Advertisement