What is RDBMS

What is RDBMS? RDBMS stands for relational database Management System. RDBMS is that the basis for SQL, and for all information systems like MS SQL Server, IBM DB2, Oracle, MySQL, and Microsoft Access. A relational database management system (RDBMS) could be a management system (DBMS) that’s supported the relative model as introduced by E. F…..

What Is the Difference Between a Join and a UNION?

Posted in DATABASES, SQL SERVERTagged , ,

Joins and Unions can be used to join data from one or one more tables.  The difference lies in how the data is combined. In simple terms, joins combine data into new columns.  If two tables are joined together, then the data from the first table is shown in one set of column alongside the….

What is Sub queries?

Posted in DATABASES, SQL SERVERTagged ,

SQL Sub queries are the queries which are set inside another query. The set queries are called as INNER query & container query is called as OUTER query. The subqueries are the queries which are executed inside of another query. The result SQL query is totally depends on the result of sub query. First the INNER….

SQL Create DataBase

SQL Create DataBase The CREATE DATABASE Statement is used to create a database in SQL. After creating a database, we can create some other database objects like  (tables, views, procedures etc.) into it. The user should have admin privileges for creating database.: SQL CREATE DATABASE Syntex: CREATE DATABASE database_name   CREATE DATABASE Example: If you….

SQL GROUP BY Clause in SQL

Posted in DATABASES, SQL SERVERTagged

The SQL GROUP BY Clause is used along with the group functions to retrieve data grouped according to one or more columns. For Example: If you want to know the total order received  by date then use group by: SELECT CreatedOnUtc AS [ORDER DATE],COUNT(*) AS [TOTAL ORDER] FROM [Order] GROUP BY CreatedOnUtc   NOTE: The….

Difference between truncate and delete in sql

TRUNCATE When you TRUNCATE a table less information is logged.  This means the TRUNCATE statement executes very fast; however, it does so at the expense of not logging each row deleted. This means, that you need to be very careful when using the command (actually be careful with DELETE as well!). Truncate Syntax TRUNCATE TABLE UserMaster Truncate….

Join in SQl

SQL Join is used to get data from two or more tables, and show record in single set of data. SQL Join is used for combining column from two or more tables by using values common to both tables. Join Keyword is used in SQL queries for joining two or more tables. Minimum required condition for….

Cusror in SQL

Cursor is a Database object which allows us to process each row and manipulate its data. A Cursor is always associated with a Select Query and it will process each row returned by the Select Query one by one. Using Cursor we can verify each row data, modify it or perform calculations which are not….

Difference between function and procedure in sql

Functions and stored procedures are set of SQL statements that can be called by name. They have many similarities like they take arguments, used to perform required tasks and have same programming style and structure. But we are more interested in differences to grab the knowledge about power they held against each other. So here….

Difference between varchar and nvarchar in sql.

Posted in DATABASES, SQL SERVER

Hi i am explaining the major difference between the VARCHAR and NVARCHAR Data Type in Sql Server: Varchar Non-Unicode Variable Length character data type. Example: DECLARE @Name AS VARCHAR(50) =‘PAWAN SHUKLA’ SELECT @Name It takes 1 byte per character Example: DECLARE @Name AS VARCHAR(50) = ‘PAWAN SHUKLA’ SELECT @Name AS Name, DATALENGTH(@Name) AS Length Result:….