Issue queries

From SQLZoo

Here you are shown how to issue queries without using a table.

This is done in different ways across different platforms but all of them will give a single row of information.

schema:scott

Only certain functions can be used without a table and these functions are called static functions.

Static functions can allow a user to obtain the current username, current date, current timestamp and also the version of the database being used.

SELECT CURRENT_USER, CURRENT_DATE
SELECT USER, CURRENT_DATE FROM dual
SELECT SYSTEM_USER, GETDATE()
SELECT ENVIRON('username'), Date()
DataWars, Data Science Practice Projects - LogoDataWars: Practice Data Science/Analysis with +100 Real Life Projects
  • Your server today is: digitalocean-sqlzoo