Did you ever face a situation where some of your innocuous looking action has cause production issue and that too big time? Well, I hope you...
Tampilkan postingan dengan label SQL. Tampilkan semua postingan
Tampilkan postingan dengan label SQL. Tampilkan semua postingan
How to Compare Date in SQL Server Query? Finding All Rows Between Two Dates
It's tricky to use dates in SQL server query, especially if you don't have good knowledge of how DateTime type works in SQL server. ...
How to get just DATE or TIME from GETDATE() in SQL Sever
The GETDATE is one of the most popular built-in methods of Microsoft SQL Server, but unlike its name suggest, it doesn't return just d...
Difference between row_number(), rank() and dense_rank() in SQL Server, Oracle.
Though all three are ranking functions in SQL, also known as window function in Microsoft SQL Server, the difference between rank() , dense_...
How to remove duplicate rows from a table in SQL
There are a couple of ways to remove duplicate rows from a table in SQL e.g. you can use a temp tables or a window function like row_number(...
How to add Primary key into a new or existing table in SQL Server
Since a primary key is nothing but a constraint you can use ALTER clause of SQL to add a primary key into existing table. Though it's a...
Difference between close and deallocate cursor in SQL
Cursor in a database is used to retrieve data from the result set, mostly one row at a time. You can use Cursor to update records and perfor...
How to Convert Result of SELECT Command to Comma Separated String in SQL Server
Sometimes, you need the result of SQL SELECT clause as a comma separated String e.g. if you are outputting ids of white-listed products. By ...
How to increase length of existing VARCHAR column in SQL Server
You can increase the length of a VARCHAR column without losing existing data in SQL Server. All you need to do is that execute following A...
How to delete from table using JOIN in SQL Server
It's a little bit tricky to delete from a table while using any type of JOIN in SQL e.g. Inner Join, Left Outer Join , or Right Outer Jo...
How to create and call stored procedure in MySQL with IN and OUT parameters
It's hard to remember exact syntax of, how to create stored procedure in MySQL, until you are creating and working on stored procedure f...
Top 10 Oracle Interview Question and Answer - Database and SQL
These are some interview question and answer asked during my recent interview. Oracle interview questions are very important during any prog...
Difference between Primary key vs Foreign key in table � SQL database tutorial
The main difference between Primary key and Foreign key in a table is that it�s the same column which behaves as primary key in the parent t...
Oracle 10g Pagination Query - SQL Example for Java Programmer
Many time we need SQL query which return data page by page i.e. 30 or 40 records at a time, which can be specified as page size. In fact Dat...
How to add, modify and drop column with default value, NOT NULL constraint - MySQL database Example
How to add column in existing table with default value is another popular SQL interview question asked for Junior level programming job in...