Giter Site home page Giter Site logo

Comments (3)

JordanMarr avatar JordanMarr commented on August 23, 2024 1

That was it. Still getting used to DBeaver which tries a little too hard to be helpful sometimes.
I know SQL Server doesn't support tuples, but maybe some others do.
I suppose this could be implemented and it could be up to the user to know if tuples are not supported.
Or maybe it would be worth converting the tuples to AND queries for SQL Server.

from sqlhydra.

JordanMarr avatar JordanMarr commented on August 23, 2024

Is that valid in PostgreSQL? I tried this query using the SqlHydra.Npgsql test database but it gives a syntax error:

select e.*
from humanresources.employee e 
(jobtitle, maritalstatus) = ('Design Engineer', 'M')

However, this works:

select e.*
from humanresources.employee e 
where jobtitle = 'Design Engineer' and maritalstatus = 'M'

from sqlhydra.

Swoorup avatar Swoorup commented on August 23, 2024

The first one is missing a where?

This should work

sample=# with t as (select 1 as f, 2 as s) select * from t where (t.f,t.s) = (1,2);
 f | s
---+---
 1 | 2
(1 row) 	

It does work with string too. It is especially handy working with comparing multiple operators i.e less than/greater than, since the expanded form is bit lengthy.

from sqlhydra.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.