Welcome To Database Training Teach By: Mr. THAN Sare
Basic Select Statement  SELECT that returns functions that return value  Changing column name with keyword AS  The DUAL table
 Select now();  Select curdate();  Select curdate(),current_time;  Select year(now());  Select year(now()),month(sysdate()),day(now()); Calculate date of birth --1994  Select year(now())-1994;
Changing column  Syntax: SELECT val AS col_name,val1 AS col_name,…………………………..valn AS col_name;  Example: Select now() AS ‘Datenow’;  sd
The DUAL table  DUAL is a special table that is used when the SELECT statement doesn’t reference to any table.  Example: Select ‘Mr.A’ FirstName,year(now())-1990 ‘Age’ from DUAL;
Database training part1

Database training part1

  • 1.
    Welcome To DatabaseTraining Teach By: Mr. THAN Sare
  • 2.
    Basic Select Statement SELECT that returns functions that return value  Changing column name with keyword AS  The DUAL table
  • 3.
     Select now(); Select curdate();  Select curdate(),current_time;  Select year(now());  Select year(now()),month(sysdate()),day(now()); Calculate date of birth --1994  Select year(now())-1994;
  • 4.
    Changing column  Syntax: SELECTval AS col_name,val1 AS col_name,…………………………..valn AS col_name;  Example: Select now() AS ‘Datenow’;  sd
  • 5.
    The DUAL table DUAL is a special table that is used when the SELECT statement doesn’t reference to any table.  Example: Select ‘Mr.A’ FirstName,year(now())-1990 ‘Age’ from DUAL;