Quantcast
Channel: CodeFari
Browsing all 265 articles
Browse latest View live
↧

Image may be NSFW.
Clik here to view.

Interview Questions and answers - SQL Server Day 10

Question: Can we sort a column using a column alias in SQL Server?Answer: Yes, we can sort a column using a column alias in SQL Server.Example: Execute following queryCREATETABLE#TEMP(...

View Article


Image may be NSFW.
Clik here to view.

Interview Questions and answers for beginners - SQL Server Day 11

Question: What is SQL?Answer: SQL stands for Structured Query Language, which is use to retrieve, store and manipulate data in database.Question: What is data?Answer: In simple terms, the data can be...

View Article


Image may be NSFW.
Clik here to view.

How to get all tables which have primary key in SQL Server?

Some time we need to get all tables which have primary key constraints. There are many way to get this information.Select       ISTC.Table_CatalogasBD_Name,       ISTC.Table_SchemaASTBL_SCHEMA,...

View Article

Image may be NSFW.
Clik here to view.

How to get all tables without primary key in SQL Server?

There are many way to find tables without primary key one of them described below.Select   Table_CataLogasDB_NAME,   Table_SchemaasTBL_SCHEMA,   Table_NameasTBL_NAME      from...

View Article

Image may be NSFW.
Clik here to view.

If parameter is null then select all data in SQL Server Query

We have a scenario, suppose we have a table like belowCREATETABLEEMP(       FNAMEVARCHAR(100)       ,LNAMEVARCHAR(100)...

View Article


Image may be NSFW.
Clik here to view.

Join between two collections in MongoDB

$lookup command used to perform join between two collections. This is new feature of MongoDB version 3.2$lookup perform the left outer join between two collections in same database. For the each input...

View Article

Image may be NSFW.
Clik here to view.

MongoDB 3.4: What’s New

In the age of digital transformation and disruption, your ability to thrive depends on how quickly you adapt to a constantly changing market environment. MongoDB 3.4 is the latest release of the...

View Article

Image may be NSFW.
Clik here to view.

Transaction Logs in SQL server. Why we need and how can we read transaction...

Problem: As we know SQL server Master DB store all the information of table, schema, stored procedures, function, triggers etc. But what is about the operational information, if any problem like error...

View Article


Image may be NSFW.
Clik here to view.

GOTO Statement in SQL Server

After a condition/statement execution, if we need to alter the flow of execution to start from a particular label, then GOTO statement will help you. Basically, GOTO keyword uses to skip statement...

View Article


Image may be NSFW.
Clik here to view.

How can to copy variable from on package to another SSIS package

We can easily copy and paste task, transformations, connection manager from one package to another but like this you cannot copy and paste variables from one to another package. If you have to use same...

View Article

Image may be NSFW.
Clik here to view.

SQL Server - How to find all empty/have values tables

Many times our managers ask to find empty tables and have value tables report. It is time taken to find the tables manually. I am writing some query which may help you to find empty and have values...

View Article

Image may be NSFW.
Clik here to view.

SQL Server - How can we truncate all tables in Database?

sp_msforeachtable can be use to truncate tables from database. sp_msforeachtable is undocumented means this is not documented by Microsoft it can be change or modified at any time. It contains two...

View Article

Image may be NSFW.
Clik here to view.

SQL Server- How to get last access/update time for tables in Database?

One day I got requirement to find last updates of tables in database. Means I want to get all the tables’ last update in database and did surfing on google and found the best way....

View Article


Image may be NSFW.
Clik here to view.

SSIS - How to Load Data from Excel File to SQL Server Table in SSIS Package

Welcome to codefari video tutorial, in this tutorial we will learn how to import data from excel file to SQL Server table in SSIS package. In this tutorial we will learn how to extract data from excel...

View Article

Image may be NSFW.
Clik here to view.

How to find recent executed query in SQL Server

Sometimes we do R&D on query and try to found the solution of any problem and due to some reason you shut down your system without saving query and next you need to recover your R&D query, so...

View Article


Image may be NSFW.
Clik here to view.

Find the user who dropped database table

Once a table was missing from our database and my project manager ask to find to user who dropped the table I search on google and find the solution so I want to share my experience with you....

View Article

Image may be NSFW.
Clik here to view.

How to escape a single quote in SQL Server

Single quote issue is always irritating me and always I ignored this issue many times but in some scenario we can't. I searched this issue on google and found some solution and I want to share with...

View Article


Image may be NSFW.
Clik here to view.

Check if a primary key constraint exists in SQL server

A primary key constraint is a combination of a NOT NULL constraint and a UNIQUE constraint. This constraint ensures that the specific column for a table has a unique identity.Primary key constraints. A...

View Article

Image may be NSFW.
Clik here to view.

Check if an index exists in SQL Server

Many times we come across the scenario where we need to some code based on whether an index exists or not.The following query may help you to check an index is exists in a particular table or not....

View Article

Image may be NSFW.
Clik here to view.

Query to find foreign key relationship and name of the constraints for each...

Sometimes we need to find all foreign key on a table so that we can analyze the relation of a table and can find the solution accordingly. It is very difficult to see it manually, by using the...

View Article
Browsing all 265 articles
Browse latest View live