Skip to content

Tag: mysql

IF Exists then update in mysql

New to MySQL, need help in translating the next query to MySQL If exists (select * from INFORMATION_SCHEMA.COLUMNS where table_name= ‘MyTable’ and column_name = ‘MyColumn’) begin …

SQL CASE WHEN (1=1) What is the 1=1 doing?

I have a SQL statement that I did not write and I am trying to get my head around it. CASE WHEN (1 = 1) THEN A.AMT WHEN (A.ACC_NO = ‘1’) THEN A.AMT – 100000000 WHEN (A.ACC_NO = ‘2’) THEN …

how to do a few queries MYSQL

this is my homework, i am searching. total 17 question.I couldn’t make 5 questions but i am trying, trying.. list the number of books each student reads. But next to those who do not read the book …