Entries in SQL (2)

How do I select all columns in q?

By listing nothing at all in the select clause:

q)table: ([] x: 5 10 15 20; y: 1 2 3 4)
q)table
x  y
----
5  1
10 2
15 3
20 4
q)select from table where x > 10
x  y
----
15 3
20 4
q)

or SQL via "s)":

q)s)select * from table where x > 10
x y
----
15 3
20 4
q)

See also: $QHOME/s.k

I know SQL and don’t care to learn q. Can I still get my work done while benefiting from kdb’s speed?

Yes and no. q supports SQL out of the box. In many cases, you will see an improvement in performance compared to a similar traditional RDBMS. However, q does not optimize your queries for you, so some queries may actually take more time.

James Gosling stated that he purposely made Java syntax C-like to facilitate the adoption of the JVM platform. q's query language was similarly designed to resemble SQL. Begin with what you know, and incrementally refine your queries using q-specific features to get the best performance possible.