[dba-SQLServer] About Time!

Arthur Fuller fuller.artful at gmail.com
Mon Jul 14 17:57:16 CDT 2008


>From Values

Row Constructors are new to SQL Server 2008 - they add the ability to insert
multiple rows using a single INSERT statements.

Row Constructors may also be used in the FROM clause to select hard-coded
values. Check out this syntax - cool huh?

SELECT *
  FROM
    (VALUES
       ('Paul', 123),
       ('David', 456),
       ('Edie', 789))
      AS RowConstructor
       (name, amount)



The Values clause must have parens, an alias, and named columns following
the alias.

Why did this take so long? MySQL led the way a long time ago.

A.



More information about the dba-SQLServer mailing list