Putting comments with SQL codes Data Science/Business Analytics for Small Business Applications › Forums › SQL › Putting comments with SQL codes Tagged: comments in SQL This topic is empty. Viewing 1 post (of 1 total) Author Posts April 16, 2022 at 2:39 pm #123 AdminKeymaster Select grade,eff_date, -- STRFTIME('%M %D %Y',sal_end_date) AS enddatesalary FROM salary_range_by_job_classification WHERE grade = 'Q90H0' Intend to put STRFTIME(‘%M %D %Y’,sal_end_date) AS enddatesalary under comments. Seems I am making a mistake. Also tried this way: Select grade,eff_date, /* STRFTIME('%M %D %Y',sal_end_date) AS enddatesalary*/ FROM salary_range_by_job_classification WHERE grade = 'Q90H0' Again seems incorrect. Reply This is a great example of why everyone should be using the leading comma convention. The dangling comma is easier to spot. SELECT grade , eff_date , -- STRFTIME('%M %D %Y',sal_end_date) AS enddatesalary FROM salary_range_by_job_classification WHERE grade = 'Q90H0' Leading comma makes it easier to comment out a line: SELECT grade , eff_date -- , STRFTIME('%M %D %Y',sal_end_date) AS enddatesalary FROM salary_range_by_job_classification WHERE grade = 'Q90H0' See the difference? Author Posts Viewing 1 post (of 1 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In