SQLServerCentral.com / Article Discussions / Article Discussions by Author / Discuss content posted by Mark Tillman / The Percent Sign in T-SQL / Latest PostsInstantForum.NET v2.9.0SQLServerCentral.comhttp://www.sqlservercentral.com/Forums/notifications@sqlservercentral.comSun, 04 Oct 2015 16:14:43 GMT20RE: The Percent Sign in T-SQLhttp://www.sqlservercentral.com/Forums/Topic1070114-2736-1.aspxGood question and thank you.Fri, 02 Mar 2012 15:11:09 GMTzymosRE: The Percent Sign in T-SQLhttp://www.sqlservercentral.com/Forums/Topic1070114-2736-1.aspx[quote][b]SanDroid (3/1/2011)[/b][hr]Tell me what the "≡" is and we will use wet noodles for the beating. :w00t:[/quote]"Is equivalent to", or "is exactly the same thing as"(Stronger than '=')Wed, 02 Mar 2011 02:08:41 GMTToreadorRE: The Percent Sign in T-SQLhttp://www.sqlservercentral.com/Forums/Topic1070114-2736-1.aspx[quote][b]SanDroid (3/1/2011)[/b][hr][quote][b]Toreador (3/1/2011)[/b][hr][quote]or more accurately8 ≡ 2 (mod 6)[/quote]Tell me what the "≡" is and we will use wet noodles for the beating. :w00t:[/quote]It can mean a lot of things, but usually it is a strong indicator of equality or identity.[url]http://en.wikipedia.org/wiki/Triple_bar[/url][url]http://en.wikipedia.org/wiki/List_of_logic_symbols[/url][url]http://en.wikipedia.org/wiki/Congruence_relation[/url][url]http://en.wikipedia.org/wiki/Equals_sign[/url]Wed, 02 Mar 2011 00:17:34 GMTKoen VerbeeckRE: The Percent Sign in T-SQLhttp://www.sqlservercentral.com/Forums/Topic1070114-2736-1.aspx[quote][b]Toreador (3/1/2011)[/b][hr][quote]or more accurately8 ≡ 2 (mod 6)[/quote]Tell me what the "≡" is and we will use wet noodles for the beating. :w00t:Tue, 01 Mar 2011 14:33:29 GMTSanDroidRE: The Percent Sign in T-SQLhttp://www.sqlservercentral.com/Forums/Topic1070114-2736-1.aspx[quote][b]mtillman-921105 (3/1/2011)[/b][hr]OK, The next time I submit a question, I'll be sure that the fluke answer, if there is one included, can in no way me misconstrued as a possible right answer.I think some of you are used to trick questions, so you're looking for a sneaky answer.[/quote]LOL... Perhaps we should also put in hints like.... "This is not the right answer" "Don't click this for points" "j/k" "Check this answer to win!"I saw nothing wrong with your question and understand a math joke when I read one. I liked your question, please do not change it at all.It tested much more than peoples knowledge of SQL and questions that can do that are priceless.Tue, 01 Mar 2011 14:30:05 GMTSanDroidRE: The Percent Sign in T-SQLhttp://www.sqlservercentral.com/Forums/Topic1070114-2736-1.aspxOK, the next time I submit a question, I'll be sure that the fluke answer, if there is one included, can in no way be misconstrued as a possible right answer.I think some of you are used to trick questions, so you're looking for a sneaky answer.Tue, 01 Mar 2011 14:24:43 GMTmtillman-921105RE: The Percent Sign in T-SQLhttp://www.sqlservercentral.com/Forums/Topic1070114-2736-1.aspxAmbiguity in the question..!Answer should be both..(1) divide by zero/ (2) remainder.Tue, 01 Mar 2011 14:17:51 GMTSQL-DBA-01RE: The Percent Sign in T-SQLhttp://www.sqlservercentral.com/Forums/Topic1070114-2736-1.aspx[quote][b]SanDroid (2/28/2011)[/b][hr]So happy that over 80 percent of us know math.Can you imagine how hard it would be a SQL developer or DBA if you didn't learn higher level math?[/quote]What's maths got to do with it? The use of % for modulo is a computing term. The mathemetical equivalent would be 'mod', though it's meaning is similar rather than identical.eg 8 % 6 = 2means roughly the same as 8 = 2 (mod 6)or more accurately8 ≡ 2 (mod 6)(note it's 25 years since I graduated so I'm probably about to be humilated when someone points out that I'm talking nonsense :-))Tue, 01 Mar 2011 02:25:55 GMTToreadorRE: The Percent Sign in T-SQLhttp://www.sqlservercentral.com/Forums/Topic1070114-2736-1.aspxThanks for the nice easy start to the week!Mon, 28 Feb 2011 13:15:08 GMTUMG DeveloperRE: The Percent Sign in T-SQLhttp://www.sqlservercentral.com/Forums/Topic1070114-2736-1.aspxthanks for the question - straight forward.Mon, 28 Feb 2011 12:52:37 GMTSQLRNNRRE: The Percent Sign in T-SQLhttp://www.sqlservercentral.com/Forums/Topic1070114-2736-1.aspx[quote][b]mtassin (2/28/2011)[/b][hr][quote]But somebody else could have said "Hey if I modulus 0 by 0 I get a divide by zero error!" and selected the last option, not realizing you were referring to what the % sign looks like.[/quote]Which would mean nothing unless they could find documentation supporting the obvious wrong answer. It was a multiple choice question with one right answer. Test taking 101 tells us to select the answer that is MOST correct.That was answer 3.I like it when there are joke answers that are funny IF you understand the questions, or what you are reading. It has been proven that these questions improve learning.Mon, 28 Feb 2011 09:59:53 GMTSanDroidRE: The Percent Sign in T-SQLhttp://www.sqlservercentral.com/Forums/Topic1070114-2736-1.aspx[quote][b]mtillman-921105 (2/28/2011)[/b]Yeah, I just included the "To divide by zero and get an error" as a joke. If you look at the symbol and take it at face value, that's what the symbol looks like.p.s. To be more clear, it looks like a small zero divided by zero: 0/0.[/quote]Gotta be careful with jokes... as I said, I got this one right.But somebody else could have said "Hey if I modulus 0 by 0 I get a divide by zero error!" and selected the last option, not realizing you were referring to what the % sign looks like. :)Mon, 28 Feb 2011 09:54:23 GMTmtassinRE: The Percent Sign in T-SQLhttp://www.sqlservercentral.com/Forums/Topic1070114-2736-1.aspxI feel so silly for selecting the wrong answer - which was so obviously wrong..I am humbled. Thank goodness it's Monday so I can blame something :-DMon, 28 Feb 2011 09:29:17 GMTBarbWRE: The Percent Sign in T-SQLhttp://www.sqlservercentral.com/Forums/Topic1070114-2736-1.aspx[quote][b]sknox (2/28/2011)[/b][hr][quote][b]mtassin (2/28/2011)[/b][hr]I got this right but...SELECT 0%0givesMsg 8134, Level 16, State 1, Line 1Divide by zero error encountered.So it seems you can use it to divide 0 by 0 and get an error.[/quote]:-)This makes sense, since a modulus can be defined as a product of division, you have to be able to do the division. Some systems, though, define x mod 0 as x (i.e, the difference between x and the nearest multiple of 0 [which is 0 (because 0 is the only multiple of 0.)])[/quote]Yeah, I just included the "To divide by zero and get an error" as a joke. If you look at the symbol and take it at face value, that's what the symbol looks like.p.s. To be more clear, it looks like a small zero divided by zero: 0/0.Mon, 28 Feb 2011 09:17:42 GMTmtillman-921105RE: The Percent Sign in T-SQLhttp://www.sqlservercentral.com/Forums/Topic1070114-2736-1.aspx[quote][b]mtassin (2/28/2011)[/b][hr]I got this right but...SELECT 0%0givesMsg 8134, Level 16, State 1, Line 1Divide by zero error encountered.So it seems you can use it to divide 0 by 0 and get an error.[/quote]Seriously? :-PMon, 28 Feb 2011 09:08:55 GMTSanDroidRE: The Percent Sign in T-SQLhttp://www.sqlservercentral.com/Forums/Topic1070114-2736-1.aspxSo happy that over 80 percent of us know math.Can you imagine how hard it would be a SQL developer or DBA if you didn't learn higher level math?Mon, 28 Feb 2011 09:05:57 GMTSanDroidRE: The Percent Sign in T-SQLhttp://www.sqlservercentral.com/Forums/Topic1070114-2736-1.aspx[quote][b]mtassin (2/28/2011)[/b][hr]I got this right but...SELECT 0%0givesMsg 8134, Level 16, State 1, Line 1Divide by zero error encountered.So it seems you can use it to divide 0 by 0 and get an error.[/quote]:-)This makes sense, since a modulus can be defined as a product of division, you have to be able to do the division. Some systems, though, define x mod 0 as x (i.e, the difference between x and the nearest multiple of 0 [which is 0 (because 0 is the only multiple of 0.)])Mon, 28 Feb 2011 08:41:42 GMTsknoxRE: The Percent Sign in T-SQLhttp://www.sqlservercentral.com/Forums/Topic1070114-2736-1.aspxI got this right but...SELECT 0%0givesMsg 8134, Level 16, State 1, Line 1Divide by zero error encountered.So it seems you can use it to divide 0 by 0 and get an error.Mon, 28 Feb 2011 08:02:06 GMTmtassinRE: The Percent Sign in T-SQLhttp://www.sqlservercentral.com/Forums/Topic1070114-2736-1.aspxThanks.It would have been nice to have a shortcut for 0/0 (divide zero by zero) :-).Mon, 28 Feb 2011 04:05:53 GMTanders-731262RE: The Percent Sign in T-SQLhttp://www.sqlservercentral.com/Forums/Topic1070114-2736-1.aspxNice easy one to start of the week, cheers. :-DMon, 28 Feb 2011 02:52:31 GMTDugyCRE: The Percent Sign in T-SQLhttp://www.sqlservercentral.com/Forums/Topic1070114-2736-1.aspxNice and easy, good for a Monday morning. Thanks.Mon, 28 Feb 2011 01:36:45 GMTKoen VerbeeckRE: The Percent Sign in T-SQLhttp://www.sqlservercentral.com/Forums/Topic1070114-2736-1.aspxeasy one, thanksIulianMon, 28 Feb 2011 01:04:28 GMTIulian -207023RE: The Percent Sign in T-SQLhttp://www.sqlservercentral.com/Forums/Topic1070114-2736-1.aspxThanks for easy question. :-)Sun, 27 Feb 2011 23:46:33 GMTtejaswini.patilRE: The Percent Sign in T-SQLhttp://www.sqlservercentral.com/Forums/Topic1070114-2736-1.aspxEasy one :-DSat, 26 Feb 2011 22:57:45 GMTM&MThe Percent Sign in T-SQLhttp://www.sqlservercentral.com/Forums/Topic1070114-2736-1.aspxComments posted to this topic are about the item [B]<A HREF="/questions/T-SQL/72388/">The Percent Sign in T-SQL</A>[/B]Sat, 26 Feb 2011 22:57:17 GMTmtillman-921105