Monday , December 11 2017
Home / Tag Archives: sqlserver

Tag Archives: sqlserver

sql server query pagination

From SQL Server 2012, Microsoft introduced a couple of T-SQL Enhancements. One of them is Query Pagination. In most of the applications, a common requirement is how to fetch the data from the database servers as page wise. In earlier versions of SQL Server like SQL Server 2005/2008/R2, we can implement …

Read More »

Special Functions

sql server special functions

Special Functions:- below are the Special Functions in sql server. 1.IsNUll():- Used to convert Nulls [crayon-5a2e856f9dde1593654912/] if expr1 is Null returns expr2 if expr1 is NotNull returns expr1 only [crayon-5a2e856f9ddeb884965306/] Sal+comm as total sal from enp 1.select empno,ename,sal,comm,sal+comm as totalsal from enp. In the above case if something sal+Null= Null 2.select …

Read More »

Conversion Functions in sql server

Converion Functions

Conversion Functions in sql server:- Used to convert from one data type to another data type 1.cast 2.convert 1. cast:- [crayon-5a2e856f9e3ad208334979/] [crayon-5a2e856f9e3b7678748703/] 2.convert:- [crayon-5a2e856f9e3bd203528274/] [crayon-5a2e856f9e3c2296807567/] [crayon-5a2e856f9e3c8862757894/] using data functions we can display dates in different formats. [crayon-5a2e856f9e3cd210427382/]  

Read More »

Sql Server Date Functions Part-2

Sql Server Date Functions

Sql Server Date Functions: In Previous Article we have seen some sql  server date functions now i am continues remaining date function in this article 9.DAY(): DAY() functions returns an integer that represents the day of the month of the specified year date. [crayon-5a2e856f9e9e5119684744/] [crayon-5a2e856f9e9ee048047482/] 10. MONTH(): MONTH() Functions Returns an …

Read More »

Sql Server Date Functions(One by One):

Sql Server Date Functions

Sql Server Date functions: SQL Server date functions are scalar functions that perform an operation on a date and time input value and returns either a string, numeric, or date and time value.  Some date and time functions are categorized as deterministic functions while others are non-deterministic. 1.GETDATE() 2.GETUTCDATE() 3.SYSDATETIME() …

Read More »

Sql Server String Functions (ONE BY ONE):-

Sql Server String Functions

Sql Server String Functions  :- 1)ASCII(s) 2)CHAR(n) 3)NCHAR(n) 4) LEN(s) 5) CHARINDEX() 6)CONCAT() 7)LEFT(s,n) 8)RIGHT(s,n) 9) SUBSTRING(s,start,length) 10)LOWER(s) 11)UPPER(s) 12)LTRIM(expression) 13) RTIMM(expression) 14) REPLACE(Expression,Pattern, Replacement_Value) 15) REPLICATE(s,n) 16) REVERSE(s) 17)  STUFF(Eepression, Start, length, Replacement_expression) 18) SPACE(n) 1)ASCII(s):- ASCII(s) function returns ASCII code of the given character expression. [crayon-5a2e856fa032a252837571/] Note:-Here “s” is …

Read More »

Mathematical Functions in Sql Server(One By One):-

Mathematical Functions

Mathematical Functions in Sql Server:- Sql Server Contains different  types of Mathematical Functions:- Abs() Ceiling() Floor() Power() Square() SQRT() Rand() Round() Sign() PI() Log()   1.Abs() :-  Abs() stands for absolute and returns  the absolute (positive) number. [crayon-5a2e856fa131a026350540/] Note :- Here “n” is a numeric expression. [crayon-5a2e856fa1323940816852/] 2.Ceiling() :-  Ceiling() …

Read More »

SQL Server Management Studio Shortcut Keys

Sql server shortcut keys

SQL Server Management Studio Shortcut Keys: Keyboard shortcuts save a lot of time and can improve productivity as well. SQL server Management Studio has several keyboard shortcuts. Here, we will explore the most essential and Important shortcuts which will make our daily programming More easily.   See Also Visual Studio Shortcut …

Read More »