Query and Description
SQL
SELECT *
INTO EMP_COPY
FROM emp
WHERE 1=1;Description
This query will create the same table with data.
SQL
SELECT *
INTO EMP_COPY_2
FROM emp
WHERE 1=2;Description
This query will create the same table without data.
Learn about the risks and techniques of using "1=1" and "1=2" in SQL queries. Explore how these conditions are exploited in SQL injection attacks, understanding the difference between true and false logical conditions.
SELECT *
INTO EMP_COPY
FROM emp
WHERE 1=1;This query will create the same table with data.
SELECT *
INTO EMP_COPY_2
FROM emp
WHERE 1=2;This query will create the same table without data.
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegisterMembers onlyeBook · SQLSupabase in Practice: Build and Ship Production Apps on Postgres, from First Table to LaunchDownload nowWrite a blog post and earn +250 SHARP when it is approved.
Write a blog
Join the conversation! Your thoughts help the community grow.