SQL 2016

  1. try_cast example
    where TRY_CAST(propertyval as INT) > 10

    if fails to convert will return NULL rather than causing the entire query to fail.
  2. what is the best practice with 'N' Unicode identifier.
    when referring to its string value, type as N'literal';  indexing can be used
  3. LIKE wildcard examples
    • %
    • _
    • '[A-D]_'
    • '[AD]%'
    • '^[0-9]%'
    • '!_%' ESCAPE '!' looks for str that start with underscore OR
    • '[_]%'
    • '%''%'
  4. What is the language neutral format
    '20160201'      ymd
  5. best way to filter datetime dates
    where attribute1 >= date1 and attribute 1 < date1
Author
nixy
ID
342593
Card Set
SQL 2016
Description
topics to remember
Updated