Collections:
Evaluating Expressions with SELECT Statements in MySQL
How To Calculate Expressions with SELECT Statements in MySQL?
✍: FYIcenter.com
There is no special SQL statements to calculate expressions. But you can use the "SELECT expression FROM DUAL" statement return the calculated value of an expression. "DUAL" is a dummy table in the server. The tutorial exercise below shows you some good examples:
SELECT 'Hello world!' FROM DUAL; Hello world! SELECT (1+2)*3/4 FROM DUAL; 2.2500 SELECT TRUE FROM DUAL; 1 SELECT TRUE AND FALSE FROM DUAL; 0 SELECT TIME(SYSDATE()) FROM DUAL; 21:30:26
⇒ Including Comments in SQL Statements in MySQL
⇐ Date and Time Data Types in MySQL
2018-04-12, 2226🔥, 0💬
Popular Posts:
How To Start Instance with a Minimal Initialization Parameter File in Oracle? The sample initializat...
How To Insert New Line Characters into Strings in SQL Server Transact-SQL? If you want to break a st...
Where to find answers to frequently asked questions I am new to Oracle database. Here is a list of f...
Where to find answers to frequently asked questions on Transaction Management: Commit or Rollback in...
How To Create a Dynamic Cursor with the DYNAMIC Option in SQL Server Transact-SQL? If the underlying...