Putting comments with SQL codes › Forums › SQL › Putting comments with SQL codes Tagged: comments in SQL This topic has 0 replies, 1 voice, and was last updated 3 years, 7 months ago by Admin. Viewing 1 post (of 1 total) Author Posts April 16, 2022 at 2:39 pm #123 AdminParticipant 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