13 posts tagged with "sql"

    preventing sql injection

    2021-03-05

     | 

    ~2 min read

     | 

    372 words

    I’ve known for a while that one of the ways to prevent SQL injection attacks is to use parameterized queries - but I never really understood…

    delete vs truncate in sql

    2021-03-05

     | 

    ~1 min read

     | 

    194 words

    I was fiddling with some test databases recently when a colleague suggested I could wipe the entire database (without dropping the table…

    delete vs truncate in sql

    2021-03-05

     | 

    ~1 min read

     | 

    194 words

    I was fiddling with some test databases recently when a colleague suggested I could wipe the entire database (without dropping the table…

    sql tricks: querying the same table twice

    2021-03-05

     | 

    ~3 min read

     | 

    552 words

    I recently came across a creative solution to finding the relationships between different values within a table using SQL. This may be…

    sql tricks: querying the same table twice

    2021-03-05

     | 

    ~3 min read

     | 

    552 words

    I recently came across a creative solution to finding the relationships between different values within a table using SQL. This may be…

    handling empty arrays with postgres

    2021-03-05

     | 

    ~2 min read

     | 

    258 words

    A few days ago, I wrote about handling arrays from Javascript to SQL. Turns out, I missed an edge case - empty arrays. If you try to set an…

    handling empty arrays with postgres

    2021-03-05

     | 

    ~2 min read

     | 

    258 words

    A few days ago, I wrote about handling arrays from Javascript to SQL. Turns out, I missed an edge case - empty arrays. If you try to set an…

    array handling: javascript to sql

    2021-03-05

     | 

    ~2 min read

     | 

    298 words

    Yesterday we updated a Postgres record’s details based on the and returned the update in a single query. What if the details was not a…

    array handling: javascript to sql

    2021-03-05

     | 

    ~2 min read

     | 

    298 words

    Yesterday we updated a Postgres record’s details based on the and returned the update in a single query. What if the details was not a…

    postgres `returning` statement

    2021-03-05

     | 

    ~2 min read

     | 

    239 words

    Often, after making a change to a database, we want to verify that the change was made and use the updated rows. A naïve approach would be…

    postgres `returning` statement

    2021-03-05

     | 

    ~2 min read

     | 

    239 words

    Often, after making a change to a database, we want to verify that the change was made and use the updated rows. A naïve approach would be…

    adding comments to a sql statement

    2021-03-05

     | 

    ~1 min read

     | 

    123 words

    There are two ways to add a comment to a SQL query - using and . The differences are as follows: With a comment surrounded by and , the…

    adding comments to a sql statement

    2021-03-05

     | 

    ~1 min read

     | 

    123 words

    There are two ways to add a comment to a SQL query - using and . The differences are as follows: With a comment surrounded by and , the…

Return to all tags