I’m a tech interested guy. I’ve touched SQL once or twice, but wasn’t able to really make sense of it. That combined with not having a practical use leaves SQL as largely a black box in my mind (though I am somewhat familiar with technical concepts in databasing).

With that, I keep seeing [pic related] as proof that Elon Musk doesn’t understand SQL.

Can someone give me a technical explanation for how one would come to that conclusion? I’d love if you could pass technical documentation for that.

  • snooggums@lemmy.world
    link
    fedilink
    English
    arrow-up
    6
    ·
    7 days ago

    It is common for long lived databases with a rotating cast of devs to use different formats in different tables as well! One might have it as a string, one might have it as a number, and the other might have it with hyphens in the same database.

    Hell, I work in a state agency and one of our older databases has a dozen tables with databases.

    • One has the whole thing as a long int: 222333444
    • One has the whole thing as a string: 2223334444 (which of course can’t be directly compared to the one that is a long int…)
    • One has separate fields for area code and the rest with a hyphen: 222 and 333-4444
    • One has the whole thing with parenthesis, a space, and a hyphen as a string: (222) 333-4444

    The main reason for the discrepancy is not looking at what was used before or not understanding that they can always change the formatting when displayed so they don’t need to include the parenthesis or hyphens in the database itself.