Skip to content

Tag: sql

MYSQL toggle enum values on each call

I want this to be like this. I have an ENUM column with 0 AND 1, i want to toggle between these two values on each query. I tried this, but it leaves the column empty. Thanks. Answer I don’t like enum for various reasons. Especially when you use it to store 0 and 1 it can be confusing, yes,

Text Qualifier syntax in PDW dwloader

I am using dwloader utility to load data into PDW. My dwloader syntax is given below: I got the data loaded into the table. But all the varchar columns have data within double ‘quotes’. My text file is commma delimited. Any idea on how to include the text qualifier in the above syntax? Answer I fi…

How to give comments in SQL

I am working in SQL. What is the complete explanation for using comments in SQL, with some example code? Answer MySQL Server supports three comment styles: From a # character to the end of the line. From a — sequence to the end of the line. In MySQL, the “– ” (double-dash) comment style requires t…