How to use IF condition in SQL SELECT statement in Snowflake
In SQL Server, we have below 3 options to implement IF condition in SQL SELECT statement in Snowflake An easy-peasy no-code method using Datameer š. CASE WHENā¦ THEN IIF Le...
- How-Tos FAQs
- September 1, 2021
How to convert month number to month name in SQL and Snowflake
There is not a built-in function to convert month number to month name in SQL. But we can use the combination of a few different date functions to achieve this. Different d...
- How-Tos FAQs
- December 17, 2020
How to initialize an AUTO_INCREMENT column in MySQL
The value of AUTO_INCREMENT can be reinitialized using the below methods. ALTER TABLEā¦ AUTO_INCREMENT TRUNCATE TABLE Let us consider the table below. CREATE TABLE student (...
- How-Tos FAQs
- February 1, 2019
How to add an IDENTITY to an existing column in SQL?
There is no straightforward way to add IDENTITY to an existing column. We need to follow a series of steps to achieve this. There are two ways to do this. Creating New Tabl...
- How-Tos FAQs
- February 1, 2019
How to get only the DATE part from the DATETIME in SQL Server and Snowflake
Follow along for a few different methods on how to get only DATE from the DATETIME in SQL Server 1. A Low-Code Method Using Datameer (On Snowflake) Wondering if there is a ...
- How-Tos FAQs
- February 1, 2019
How to escape a single quote in SQL Server?
The most simple way to escape a single quote in SQL Server is to pair it with another single quote. Below are some examples: -- For selecting: [My name's Jack.] SELECT 'My ...
- How-Tos FAQs
- February 1, 2019
How to create an AUTO_INCREMENT column in a table on Oracle DB using SQL?
Before Oracle 12c, we donāt have a direct method of generating an AUTO_INCREMENT column in a table. We need to use the combination of Sequences and Triggers. Now, we have t...
- How-Tos FAQs
- February 1, 2019
What is the difference between INNER JOIN and OUTER JOIN in SQL?
In a relational database, the data are distributed into different tables to reduce data redundancy and improve data integrity. The JOINs in SQL help to combine the rows of ...
- How-Tos FAQs
- February 1, 2019
How to select dates between the two given dates in SQL
We can select dates between the two given dates in SQL using the below methods. BETWEEN ā¦ AND ā¦ Operator >= (Greater Than or Equal to) and <=(Smaller Than or Equal to...
- How-Tos FAQs
- December 17, 2018
DELETE data from a table by joining with another table in SQL
We can join multiple tables in the DELETE statement, just like in the SELECT statement. DELETE data from a table by joining with another table in SQL Let us consider the be...
- How-Tos FAQs
- December 17, 2018
How to add a column with a default value to an existing table in SQL
To SQL add a column with a default value is a simple operation in SQL. Let us set up a āstudentā table as below: CREATE TABLE student ( Ā Ā student_id INT , Ā Ā student_nam...
- How-Tos FAQs
- December 17, 2018
Can we use stored procedures in a SELECT statement in SQL SERVER?
We can not directly use stored procedures in a SELECT statement. The database objects that can be used in a SELECT statement are: What can be used in a SELECT statement? Ta...
- How-Tos FAQs
- December 17, 2018