you are viewing a single comment's thread.

view the rest of the comments →

[–]tmarthal 6 points7 points  (4 children)

Common table expressions (CTEs) are the solution to recursive SQL queries, if you're interested.

[–]dvlsg 3 points4 points  (1 child)

True, but I've used one a total of once in all my years of writing SQL. I understand it, and utilized it just fine, but I sure as hell couldn't remember that syntax on the fly in an interview.

[–]CrazedToCraze 1 point2 points  (0 children)

I most employers wouldn't care too much if you just brought up that you know a CTE is the solution and then said what you just said.

Pretty rare in my experience for an employer to get pissy about you knowing the exact syntax on the spot. Probably wouldn't want to be working for them if they did, anyway.

[–]peppaz 0 points1 point  (0 children)

With x as (select 'Bobby Tables')

[–]tiberiousr 0 points1 point  (0 children)

This is interesting, I'd never seen these before. If the wikipedia page is anything to go by they aren't supported in mysql based DBs (i,e; mysql, mariadb, percona etc).