SQL

Thursday, May 25, 2017

SELECT from nothing?

It's not consistent across vendors - Oracle, MySQL, and DB2 support dual:
SELECT 'Hello world'
  FROM DUAL
...while SQL Server, PostgreSQL, and SQLite don't require the FROM DUAL:
SELECT 'Hello world'
MySQL does support both ways.
Posted by Tecknovice at 1:49 AM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

About Me

Tecknovice
View my complete profile

Blog Archive

  • ►  2021 (1)
    • ►  January (1)
  • ►  2020 (3)
    • ►  December (3)
  • ▼  2017 (28)
    • ►  August (2)
    • ▼  May (24)
      • MySQL WEEK() function
      • SQL Select only rows with Max Value on a Column
      • Useful SQL websites
      • Self JOIN
      • Visual Representation of SQL Joins (CodeProject)
      • SELECT from nothing?
      • HAVING
      • ORDER BY
      • DISTINCT
      • Aggregate Functions
      • GROUP BY
      • select the extreme from each group
      • How to declare a variable in MySQL?
      • SQL COUNT(), AVG() and SUM() Functions
      • How to get first character of a string in SQL?
      • converts the value of a field to uppercase.
      • converts the value of a field to lowercase.
      • SQL CONCATENATE (appending strings to one another)...
      • MySQL
      • Hướng dẫn cài đặt và cấu hình MySQL Community
      • + (String Concatenation) (Transact-SQL)
      • SQL NULL Functions
      • UNION
      • Get the length of the value in a text field.
    • ►  April (2)
  • ►  2016 (8)
    • ►  December (6)
    • ►  November (2)
Simple theme. Powered by Blogger.