You are here
Home > Author: Riya Patel

Kotlin: Interfaces

Interfaces In this post we will discuss Interfaces in kotlin, use of it, and how to declare interface in kotlin. Interface only have function declaration it not contains its implementation. In kotlin interface is by default open. You have to use override keyword in class to implement its function. If you

SQL :String Functions

String Functions In this post we will discuss String functions in SQL. SQL support many functions for String manipulations like CONCATE(), LEFT(), RIGHT() etc. In this entire post for examples we use below table. Table: persons p_id firstname lastname city 1 Amisha Patel Anand 2 Bina Patel Baroda 3 Tina Doyle v.v.nagar 4 Riya Patel Anand 5 Nikunj Patel NULL Concatenation: T-SQL support two ways for string concatenation. Concatenation using ‘+’ operator: For concatenation of string we use +

Kotlin: Companion Object

Companion Object In this post we will discuss companion object in kotlin. Kotlin not support static methods and variable so we use companion object to make variable and methods static. The companion objects are declared inside a class using companion The function declared inside a companion object are called using

Kotlin: Enum Class

Kotlin: Enum Class In this post we will discuss Enum Class in kotlin. Enumeration is a special type of class, if class is enum type then it is limited to a set of predefined constants. To declare a class as enum use enum keyword before the class Example: enum class Direction { North,South,West,East } fun main(args:Array<String>) { var

SQL: System functions

System functions In this post we will discuss System functions, it returns information about various system parameters. @@ROWCOUNT @@ROWCOUNT function returns number of rows affected by the last executed statement. It is used to check if the previous statement affects any rows by checking the function’s result is zero or greater than


OUTPUT OPTION In this post we will discuss about OUTPUT option. T-SQL supports an OUTPUT clause for modification statements, which we can use to return information from modified rows. We can use output option for purposes like auditing, archiving and others. We can use OUTPUT clause with insert, update, delete statements.

Kotlin:Data Class

Data Class In this post we will discuss Data classes with example. We frequently create a class to do nothing but hold data. Kotlin provides similar concept, called data class and marked as data. When we use data class the primary constructor only accepts property variables such as val or var

SQL: Aggregate Functions

SQL: Aggregate Functions In this post we will discuss aggregate functions. T-SQL support SUM, MIN, MAX, AVG, COUNT, SQRT, POWER and other aggregate functions. It ignores NULL inputs when applied to an expression. Use DISTINCT clause to remove duplicate values. In the group query the aggregate functions is applied per group,