Search
 
SCRIPT & CODE EXAMPLE
 

SQL

mysql calcular idade

SELECT
    YEAR(FROM_DAYS(TO_DAYS(NOW())-TO_DAYS(nascimento))) AS idade
FROM
    clientes
Comment

mysql calcular idade

SELECT * 
FROM alunos a 
INNER JOIN matriculas m ON m.numero_matricula = a.numero_matricula 
WHERE YEAR(FROM_DAYS(TO_DAYS(m.data_matricula) - TO_DAYS(a.alunascimento))) < 17
Comment

PREVIOUS NEXT
Code Example
Sql :: window function sql 
Sql :: postgresql create table add unique constraints 
Sql :: syntax error at or near "AUTO_INCREMENT" 
Sql :: denormalization in sql example 
Sql :: what is between keyword used for 
Sql :: sql into 
Sql :: select only columns that are not empty oracle sql 
Sql :: Order of execution SQL or MySql query Or Logical order of operations: 
Sql :: grab part of a string sql 
Sql :: copy table db 
Sql :: what does leave do in mysql 
Sql :: sql subquery 
Sql :: delete sql 
Sql :: min max in sql 
Sql :: join multiple tables in sql 
Sql :: how to populate a table in MySQL from and existing csv file 
Sql :: SQL SMALLDATETIME Data Type 
Sql :: mysql write into table 
Sql :: sql update subtract value 
Sql :: mysql run file command 
Sql :: import database from sql file 
Sql :: sqlite select regex 
Sql :: oracle insert multiple rows into same table 
Sql :: SQLSTATE[42S02]: Base table or view not found: 1146 Tabl 
Sql :: sql to linq converter 
Sql :: iterative instruction sql 
Sql :: mysql isshow 
Sql :: mysql select all and rename one 
Sql :: delete double on SQL with multiple primary keys 
Sql :: oracle single row functions 
ADD CONTENT
Topic
Content
Source link
Name
2+9 =