arrow_back Back to Notebook
sql
sql
January 10, 2019

Check a column does not equal another column in SQL

To check that a column does not equal another column in SQL you can do the following

Example check

ALTER TABLE table_name
    ADD CONSTRAINT contraint_name
        CHECK (column_a <> column_b);

Thanks for reading!

John Wiseman

Full-Stack Software Engineer building scalable digital solutions. specializing in modern web technologies and mission-critical systems.

© 2026 Wiseman Systems Pty. Ltd.

Navigation

Start a Conversation

Ready to discuss your next project? Let's build something extraordinary together.

Get in Touch