Thursday, 19 January 2017

Some Important SQL Query

Tags




No.1. select Only Date from DateTime Database:-
//DOB- column Name Name
// [dbo].[Emp_tb]- Table Name
SELECT CONVERT(CHAR(10), DOB, 120) FROM [dbo].[Emp_tb];



No2. Joint 2 column name in one column in different name 

SELECT CONCAT(column_1,' ' ,column_2) AS Name FROM table_name 
// Make sure there is space between ''



EmoticonEmoticon