https://stackoverflow.com/questions/5074044/shouldnt-from-come-before-select-in-sql Stack Overflow 1. About 2. Products 3. For Teams 1. Stack Overflow Public questions & answers 2. Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers 3. Talent Build your employer brand 4. Advertising Reach developers & technologists worldwide 5. Labs The future of collective knowledge sharing 6. About the company [ ] Loading... 1. current community + Stack Overflow help chat + Meta Stack Overflow your communities Sign up or log in to customize your list. more stack exchange communities company blog 2. 3. Log in 4. Sign up 1. 1. Home 2. Questions 3. Tags 4. 5. Users 6. Companies 7. Collectives 8. Explore Collectives 9. Labs 10. Discussions 2. Teams Stack Overflow for Teams - Start collaborating and sharing organizational knowledge. [teams-illo-free-si] Create a free Team Why Teams? 3. Teams 4. Create free Team Collectives(tm) on Stack Overflow Find centralized, trusted content and collaborate around the technologies you use most. Learn more about Collectives Teams Q&A for work Connect and share knowledge within a single location that is structured and easy to search. Learn more about Teams Get early access and see previews of new features. Learn more about Labs Shouldn't FROM come before SELECT in Sql? [closed] Ask Question Asked 12 years, 11 months ago Modified today Viewed 12k times 32 Closed. This question is opinion-based. It is not currently accepting answers. --------------------------------------------------------------------- Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 1 hour ago. Improve this question This is something that has always bothered me. Wouldnt it make more sense to have the FROM clause come before the SELECT? Whenever Im writing sql, especially with joins, I always figure out the FROM clause first and then write the SELECT. Plus, putting the FROM first would allow for better intellisense inside the editor. Does anyone know what the reasoning was to have SELECT come first? Am I only one who is bothered by this? * sql * select Share Improve this question Follow asked Feb 22, 2011 at 4:36 David's user avatar DavidDavid 39111 gold badge33 silver badges1515 bronze badges 4 * 1 Which one of these sounds more natural to you: select fruit from basket where basket contains oranges or from basket select fruit where basket contains apples? The latter would be easier for intellisense but the former easier for us mere humans, especially if we wouldn't happen to be programmers. - Aleksi Yrttiaho Feb 22, 2011 at 4:43 * 1 The "better intellisense" was the main reason the LINQ team at Microsoft changed the order of the keywords - other than that: I guess you can argue pro and con for both approaches, and unless you want to write your own database, the argument is pretty moot... - marc_s Feb 22, 2011 at 5:45 * 2 @AleksiYrttiaho If we wouldn't happen to be programmers then we wouldn't be writing SQLs, right? I think SQL should be designed for not mere humans but programmers who will use it. - Snow Blind Dec 6, 2012 at 10:35 * @SnowBlind SQL is a funny language that is also used by people who are not quite programmers. There's a lot of people who've learned some of the basics and use SQL with Access or similar software and there's those who are maintaining or using data with some recipe-like SQL because it is more cost-effective to teach them a bit of SQL instead of creating a sufficiently powerful and easy to use UI for only a few users. - Aleksi Yrttiaho Dec 10, 2012 at 8:40 Add a comment | 2 Answers 2 Sorted by: Reset to default [Highest score (default) ] 16 Yes it is strange and counterintuitive. Hugh Darwen theorises about how this state of affairs came about: Do you take SELECT-FROM-WHERE for granted, or do you, like me, find it rather curious that the System R team should have spurned the normal way of writing expressions of arbitrary complexity in favour of something utterly idiosyncratic and, one might say, rather dictatorial...? The fact is that in the 1960s various scripting languages (as we tend to call such things these days) had come about for the purposes of report generation, especially ad hoc report generation. We had one such language in the prerelational DBMS called Terminal Business System (TBS) that I worked on for IBM from 1969-77. Our language required the user to specify the required report in a series of steps that had to be given in the prescribed order... A somewhat similar but much more sophisticated report generator was later developed by IBM in the US, as part of a product called (prosaically, as was IBM's style in those days) Generalized Information System (GIS)... when I first looked at SQL, my immediate reaction was "Oh no! Son of GIS? Please not that!" I might have been quite wrong about this. The similarity I perceived might have been illusory and even if it was not, I have no firm evidence that anybody in the System R team was familiar with GIS. The fact remains that the general style of a fixed order of actions was the order of the day at the time. I postulate that SQL's SELECT-FROM-WHERE arose out of this fashion. From HAVING a Blunderful Time Share Improve this answer Follow answered Feb 22, 2011 at 8:35 onedaywhen's user avatar onedaywhenonedaywhen 55.9k1212 gold badges101101 silver badges140140 bronze badges Add a comment | 4 The syntax was to resemble English, according to an oral history interview with Donald D. Chamberlin: It was our first attempt to base the language exclusively on English keywords so that you could read a query from an intuitive understanding of the English words. A query might say something like, 'Select salary from employee where manager equals John Smith.' From the English words like 'select,' 'from' and 'where', you can get a pretty good idea for what the query is about. Share Improve this answer Follow edited 6 hours ago mikemaccana's user avatar mikemaccana 115k101101 gold badges401401 silver badges504504 bronze badges answered Feb 22, 2011 at 4:42 John Pick's user avatar John PickJohn Pick 5,6083232 silver badges3131 bronze badges 4 * +1 Nice Donald D. Chamberlin interview. - Conrad Frix Feb 22, 2011 at 4:47 * @mikemaccana the linked page includes a link to download the interview transcript from: conservancy.umn.edu/bitstream/handle/ 11299/107215/oh329dc.pdf - James 6 hours ago * Thanks @James, please keep the link updated in order for this question to remain relevant. - Corey Ogburn 6 hours ago * @James someone fixed the link in the last hour, and I've added a quote. - mikemaccana 6 hours ago Add a comment | Not the answer you're looking for? Browse other questions tagged * sql * select or ask your own question. * Featured on Meta * Updates to the Acceptable Use Policy (AUP) - January 2024 * Site maintenance - Thursday, February 1, 2024 @ 01:00 UTC (Wednesday, January... * Temporary policy: Generative AI (e.g., ChatGPT) is banned * January 2024 post from Ryan Polk, Chief Product Officer * Discussions update: Expansion to all tags in February Visit chat Related 1 from clause issue with mysql 4 Problem using the field 'from' in sql query 10 How can a SQL query have two from clauses? 4 Why doesn't this SELECT statment have a FROM? 1 SQL Syntax error in FROM clause 0 Incorrect syntax near the keyword 'FROM' in my query 0 SQL SELECT from SELECT 1 Why can't I use a select table as input of from in SQL 0 In what situation would you use Select without from? 1 Clarification about Select from (select...) statement Hot Network Questions * Hvac drain pipe fell off. Accident or not? * Compute ERA5 daily climatology without consuming lot of memory * Assign values from a list to a multivariable function that also has other arguments * Mixed-level class of undergrads and PhD engineers: grading on different curves * Manipulating rules * Crew of soldiers learn that robots have been faking the war in an effort to save humanity * Prove there's a day of the week for each number in a year * Do we know if toasters exist? * How does resolution of .. and . proceed in Linux systems? * SAT formulation of the condition that an even number of a given set of variables must be set to true * Integrate InterpolatingFunction times polynomial * Is this a statistical argument for reincarnation being almost inevitable? * Is there a fast way to check if a matrix has any small eigenvalues? * Reasons to use combinations of resistors (parallel or in series): Looking for educational examples * Do full-text translators such as DeepL or Google Translate fall under the term "Generative AI"? * The Reasoning Behind TCP and UDP Multiplexing Tuple * Some .oints and numbers * Is Facebook a monopoly? * A strange condition of convexity? * How to keep squirrels off of a 4x4 post that's already in the ground? * An idiom that means "to carefully choose words while speaking" * Math is Awesome * Are there alternative interpretations of Romans 1:18-25 within Christianity that challenge the idea that atheists inherently know that God exists? * 80s 90s movie involving a futuristic society with no crime more hot questions * lang-sql Stack Overflow * Questions * Help Products * Teams * Advertising * Collectives * Talent Company * About * Press * Work Here * Legal * Privacy Policy * Terms of Service * Contact Us * Cookie Settings * Cookie Policy Stack Exchange Network * Technology * Culture & recreation * Life & arts * Science * Professional * Business * API * Data * Blog * Facebook * Twitter * LinkedIn * Instagram Site design / logo (c) 2024 Stack Exchange Inc; user contributions licensed under CC BY-SA. rev 2024.1.25.3852