Search
 
SCRIPT & CODE EXAMPLE
 

SQL

get day in sql

SELECT DATEPART(m, GETDATE()) as theMonth  -- returns 11
SELECT DATEPART(d, GETDATE()) as theDay   -- returns 20
SELECT DATEPART(yy, GETDATE()) as theYear   -- returns 2013
Comment

PREVIOUS NEXT
Code Example
Sql :: Copy Table from SQL to CSV 
Sql :: how to use a database to see tables mysql 
Sql :: mysql select another database 
Sql :: grant read only privileges postgres user 
Sql :: enable service broker in sql server 
Sql :: replace all numbers in mysql 
Sql :: how to create new user and database postgresql in ubuntu 
Sql :: incorrect string value: mysql 
Sql :: oracle saurce code 
Sql :: Suse Linux restart MySQL 
Sql :: mysql grant grant option 
Sql :: ORA-00942 
Sql :: mysql between date range 
Sql :: sql concat string with column value 
Sql :: find duplicates mysql 
Sql :: insert query return id mysql 
Sql :: calculate age in sql postgresql 
Sql :: show slave status mysql 
Sql :: mysql database manager 
Sql :: import large .sql files into lampp 
Sql :: MySQL server is running with the –secure-file-priv 
Sql :: Assign value to var in SQL 
Sql :: update from table tsql 
Sql :: sqlite truncate tables command 
Sql :: how to check the mysql version mac 
Sql :: create stored procedure 
Sql :: select first and last row sql 
Sql :: create index mysql cli 
Sql :: mysql compare datetime to another datetime 
Sql :: date sql get the last week count 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =