Generate Unique Number
<p>I have an SQL Query </p>

<pre><code>select substring(
            replace(
                replace(
                    replace(
                        replace(
                            convert(varchar,sysdatetime(),121),
                        '-',''),
                    ' ',''),
                ':',''),
            '.','')
        ,1,18) as DATETIME
</code></pre>

<p>It is generating 18 digits Current Number like <code>201605011221374719</code></p>

<p>How can I change this query to generate 11 digits Unique Numbers ?</p>