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, 2451🔥, 0💬
Popular Posts:
How To Break Query Output into Pages in MySQL? If you have a query that returns hundreds of rows, an...
Collections: Interview Questions MySQL Tutorials MySQL Functions Oracle Tutorials SQL Server Tutoria...
How to download Microsoft SQL Server 2005 Express Edition in SQL Server? Microsoft SQL Server 2005 E...
What Is Program Global Area (PGA) in Oracle? A Program Global Area (PGA) is a memory buffer that is ...
How To Find Out What Privileges a User Currently Has in Oracle? Privileges granted to users are list...