Search
 
SCRIPT & CODE EXAMPLE
 

SQL

mysql previous year

SELECT * FROM my_table
WHERE YEAR(my_date) = YEAR(DATE_SUB(CURDATE(), INTERVAL 1 YEAR));
Comment

PREVIOUS NEXT
Code Example
Sql :: mysql load data infile csv 
Sql :: data directory postgresql 
Sql :: stop and start mysql 
Sql :: sql server current date minus 5 years 
Sql :: like sql 
Sql :: sql random integer 
Sql :: tsql cmd exec script from file 
Sql :: sql update table based on another table 
Sql :: array out of range mql4 
Sql :: SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint 
Sql :: mysql get random data 
Sql :: sql drop database if exists 
Sql :: show columns in sql 
Sql :: mysql select another database 
Sql :: blob datatype in mysql 
Sql :: sql server obtener fecha en formato dd/mm/yyyy 
Sql :: coalesce postgresql 
Sql :: check if table exists oracle 
Sql :: sql server set variable if exists 
Sql :: how to create enum in postgresql 
Sql :: python sqlalchemy connection show server 
Sql :: oracle auto increment primary key 
Sql :: change date format in oracle query 
Sql :: snap remove mysql workbench 
Sql :: sql server concat string and int 
Sql :: truncate function in sql oracle 
Sql :: sql upsert 
Sql :: get date from timestamp oracle 
Sql :: ms sql create user 
Sql :: oracle timestamp to date 
ADD CONTENT
Topic
Content
Source link
Name
9+7 =