Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "sql"
-
So I went for interview today.
.
.
Interviewer : Can u give some theory test about php?
Me : Sir, Can u please open your site?
Interviewer: sure 🙂
Me : Sir, I just logged in as Owner of ur company, Your site is not protected from sql injection.
Interviewer : 😌😌
Me : Sir, test?? 😜
xxxxxxxxxxx -------------------- xxxxxxxxx20 -
Fucked up an sql join once and accidentally deleted myself from the employee table in the prod database. So I kinda fired myself... Good thing we had backups. 😂2
-
Mom:What are you studying?
Me:Types of SQL Injection
Mom:U r in engineering?Right?So why are u studying types of Injections?
Me:🤦♂️😂😂10 -
Company: "We'd like to use SQL Server Enterprise" MS: "That'll be a quarter million dollars + $20K/month" Company: "Ok!" ... Company: "We'd like to use Babel" Babel: "Ok! npm i babel --save" Company: "Cool" Babel: "Would you like to help contribute financially?" Company: "lol no"3
-
I remember some years ago when a professor asked -
"What is the difference between SQL and MySQL?"
And one of the students answered -
Uh... I don't know... SQL is more like a general SQL and MySQL is a personal SQL...
:|5 -
Just found out there's a legit Dutch DJ call "SQL".
Guess what type of posts he's being tagged in mostly?8 -
When you see a web service API accepting a SQL query in one of its JSON fields and the evil starts growing within you..
DROP ALL DATABASES
Just because you can!4 -
You know you've had to deal with a tough database problem at work when you start seeing SQL in your own kitchen... (It says SOL meaning salt)
P.s. I sure hope this is how these memes work, because I want my avatar15 -
The moment when you realize you just ran a SQL update with a ';' before the WHERE clause............fml10
-
We had issues with lack of disk space on our production SQL server. Another developer decided to delete the databases he thought weren't in use to clear some space.
Ever think about checking first?!
Production chaos!7 -
3 SQL Databases went into a NoSQL Bar.
After a while, they walked out because
.
.
They couldn't find tables there.5 -
Me: Enters SQL class
Prof: We will draw ERD diagram on awwapp
Me: (In my head - I hate ERD diagrams) start drawing the first ERD diagram
Prof: That diagram is wrong
Prof: opens SQL Activities_Solution.pdf on his PC
Me: Tried to change the file name on aws to get solution file - fail
Copy SQL Activities.pdf file url (https://url/courses/6429/...). Adds 1 to 1100726 = 1100727 and downloads SQL Activities_Solution.pdf
Open PDF in one tab and awwapp on another and just draw the solution
Prof: Are you sure this diagram is corect?
Me: (In my head - I copied the solution so yes) ...
Prof: Let me check the question
Me: (In my head - seriously? you don't know the answer)
Prof: Checks the correct answer on his PC and then checks the answer on my PC
Me: (In my head - completed another boring uni class) pack up and go home8 -
Discovered one of the worst db designs ever:
- A cust is inserted in a table.
- The insert trigger is fired, calling a stored proc
- The stored proc being called creates a dynamic sql that builds a create table statement for 8 different tables. These tables will be postfixed with the newly-created cust id and is executed.
When querying info for a cust, a stored proc is used that accepts an id value would be appended to another dynamic sql that creates a select statement across all 8 tables for one customer.
Shoot me now.10 -
I recalled a seemingly simple task I took on.
We were building a booking system, and I had to figure out how to retrieve bookings by a certain date range.
Upfront, the tasked seemed simple until I realised I had to both figure out the logic and the SQL statements needed to retrieve all bookings within a certain date range in one query.
I ended up drawing a model to help me visualise the various date-range criteria to be satisfied. And used unit tests to help me think through each date range criterion and make sure they were accurate. Some were obviously from paranoia, but better to be safe than sorry...
After that, I had wrote down raw SQL directly into Sequel Pro first to make sure my query logic was accurate too, before translating into something the ORM equivalent. This was when I learned how to define and use variables in SQL. The variables were throw-away code; I just didn't want to have to hard-code the test date-ranges over and over again; minimise chances of spelling errors.
Needless to say, felt my problem-solving skills went up one level after this task. Saw my coding style and unit tests improve. And also the thought processes that go into how to maintain code quality...4 -
4 years ago, during our college, a friend of mine was explaining us about hacking using simple SQL injections. He showed us some of the sites he hacked. Out of curiosity we tried it on college internal website it worked. We had access to all the details of all the students in university, and even the lecturer's information. We informed the management , they were shocked on seeing this. They had just spent 25 lakhs for this website couple of months ago.6
-
This fucking stupid asshole developer, wrote every single SQL execution with string formatting. Made me a full sleepless night fixing this shit. Isn’t this a classical SQL injection sample?15
-
1. Buy a road
2. Name it after an sql injection
3. Have mail delivered to you
4. ...
5. Profit... I guess?7 -
me: oh you can add a where clause to filter xxx out with your group by.
arrogant junior: whuuut? you can use where clause with group by ? No u can't!
me: err... yes you can...
arrogant junior: NO!!!! No it doesn't work that way!
me : okay okay... fine ...
**30 mins later**
i see a where clause in the sql statement lol...I don't know why this person is always so pissed and fierce lol6 -
> TeamLeader1: I just discovered SQL is actually super fast! The low responsiveness I've experienced comes from our ORM!
> IHateForALiving: well of course SQL is blazingly fast. SQL has been refined by the best engineers in the world for the past 50 years, its performances are unparalleled for everything you could possibly need, unless you want to scale REALLY big. Sequelize, instead, is an Active Record ORM, so it's bound to struggle with huge amount of data, because every single row will get attached a significant amount of black magic to make sure everything syncs correctly. Why is that?
> TeamLeader1: I have a problem with this frontend component, it doesn't allow pagination. I tried downloading the whole DB to bypass that, but the ORM is slow... so I will bypass the ORM and download the whole table with a raw query. Look at that! It works like a charm, it's super duper fast!'
This mf is downloading some 35 thousand rows every time some user loads a page because he doesn't know how to paginate the fucking table with Angular, there's no way these people are real.12 -
A Month ago...
Me: when are you going to complete the report
Friend: we can do it in minutes
Me: you can't Ctrl + c and Ctrl +v as there is plagiarism check
Friend: we have spin bot
Me: you do that now itself . if something happens? You can join me .
Friend: just chill
Now ...
Me: done with report
Friend: feeding it to spin bot!
Feeds text related to database security....
Spin bot:
Garbage collector == city worker
SQL statements == SQL explanation
SQL queries == SQL interrogation
SQL injection == SQL infusion
Attack == assault
Malicious == noxious
Data integrity == information uprightness
Sensitive == touchy
.....
Me: told you so...
**spin not == article rewriter3 -
Someone wanted to test if the I-Scout game was capable of preventing SQL injections 😂😂
The I-Scout game is by the way an indoor and outdoor game for scouts all over the globe..2 -
Easy cop out for people who wrote code vulenerable to SQL injection: It's not a bug, it's a feature that let's users search using SQL syntax.1
-
Got hired as an SSRS engineer. Walked into work day 1 thinking I was a bad ass with my SQL joes2pros knowledge and quickly (and i mean quickly) got smacked down with what real SQL procs look like........should've renamed my title to SSRS reverse-engineer. Good times.2
-
Senior showing fellow intern what SQL injection is on the app the intern created :
Senior : "then I hit enter and the query get executed and...
Intern : "don't you dare hitting enter!!!"4 -
According to my predecessor, nothing showcases your SQL skills quite like generating the entire page (markup, JavaScript and all) from a single 2500 line query.7
-
Dear weird stackoverflow,
What SQL knowledge do I need to hack devRant and get an avatar on here ?18 -
> IHateForALiving: I have added markdown on the client! Now the sys admin can use markdown and it's going to be rendered as HTML
> Team leader: ok, I've seen you also included some pics of the tests you made. It's nice, there's no XSS vulnerabilities, now I want you to make sure you didn't introduce any SQL injection too. Post the results of the tests in the tickets, for everybody to see.
I've been trying to extract from him for 15 minutes how sending a text through a markdown renderer on the client is supposed to create a SQL injection on the server, I've been trying to extract from him how showing all of this to the world would improve our reputation.
I miserably failed, I don't know how the fuck am I supposed to test this thing and if I a colleague wasted time to make sure some client-side rendering didn't create a SQL injection I'd make sure to point and laugh at them every time they open their mouth.9 -
Hah!
I just broke my record and generated (not exported or imported) the biggest SQL file!
A massive 15.7GB SQL file monster.
I hope the import will go well.6 -
> Young dev apprentice me pair programming with another developer
> Dude checks bug report of a customer, saying something about a "Blind SQL Injection"
> Young me asking what that "Blind" part means
> "Dunno man, maybe u gotta close your eyes when hacking this"
Guess what, the issue was never fixed -
Whoever thought setting up SQL database connections through XML was a good idea needs to be put on trial. And then exiled to a deserted island so they can think about all the pain they put me through.5
-
I hate SQL Server so much, don't matter how Microsoft say they improve themselves at SQL Server.
There's a lot of fucking bloat, messes your system and your services, adds tons of crap in your system registry, while more advanced SQL engines such MariaDB/PostgreSQL are more contained, and its very small.
Why SQL Server has to mess with Windows' ACL and his own privilege systems?.
Uninstall it and a lot of components remain hidden and tons of registry entries, not even TotalUninstaller or CCleaner can help.
I hate it since my technical high school and my goddamn college is forcing us to use SQL Sever for EVERYTHING, instead of good alternatives, messed my computer entirely requiring to format.
I try always to convince my freelance clients to use open-source alternatives, and say how SQL Server is so crap, (i had variant degrees of success).13 -
Friend asked if I have ever built authentication using PHP and SQL...
Feel like sending links for them to research how instead of having me build it for them.
Teach a man to fish...?7 -
How do you pronounce SQL?
"See for me, I just go my own way and pronounce it as ‘sqwool, or ‘sqwll’, which sometimes gets my coworkers (not db or programming people) calling it ‘Squirrel’. As such we have a custom written utility program which automates running certain SQL commands on various databases which is aptly named SQuirreL. Then we started to have fun with it: The ‘pre-defined’ sets of SQL are held in a ‘.nut’ file which you give to SQuirreL. When you want to see what scripts have been run, you check the SQuirrel’s .log to see what .nut files it has ‘eaten’. We thought about naming the log files .poop, but I felt that was too far. I know right now there’s people reading this cringing, but I say lighten up. My boss when presented with the tool, did not get ANY of the Squirrel/nut references… I mean the tool’s icon was a cartoon squirrel holding an acorn for crying out lout, but I digress.
So yeah, I call it Sqwll or Sqwool, but only when talking to people who don’t matter."
Source, in the comments: http://patorjk.com/blog/2012/...
I doubt this has ever been posted. =)8 -
I was to optimise a SQL query (7 min to execute,yes) with around 20 joins (I did not write this). Checked for missing indexes,etc.. but nothing worked. Stared outside the window, and back to desk reordered the joins ,executed in 10 secs.1
-
Nothing like a SQL Script failing and fucking up an important Database right before my christmas vacation...10
-
When you switch back to Javascript after a while of using SQL and dont see the error in this line..
Thanks for syntax highlighting that, firefox! I spent almost 10mins checking the parentheses and trying different combos...1 -
Inspired by this post
https://devrant.com/rants/2217978/...
I challenged myself to use SQL to get the prime numbers under 100,0008 -
Today in a meeting, a non-dev analyst who frequently uses SQL mentioned in passing that he uses Excel as a text editor for his SQL code. I don't know what he said after that because I wasn't able to get past the fact that Excel is his go to text editor.6
-
Hired a new BI developer. She tested reasonably ok in SQL, and certainly showed good strengths in visualising data, plus had a good attitude in the interview. We hired her. She broke her laptop the first day. We got her another then she complained the camera didn't work but didn't realise the lever in front of the camera was to move the privacy shutter off and on.
Assigned her some work of taking queries that are used in a BI tool that targets the transactional database directly, and re-jigging them for Snowflake which we're using as a data warehouse now, aggregating all our data into one place. Yet, she's struggling to understand why the SQL query she's pasted in doesn't work as-is.
I go over it again; the source schemas and tables are this, but in Snowflake we've named them this. She then bemoans how much work that is to change them all - I say use find and replace. She then struggles with Snowflake syntax errors and asks for a guide on T-SQL to Snowflake. I show her Google and say "this is what I did when I hit these problems - search for 'Snowflake equivalent to T-SQL getdate()' or 'how to get current date in Snowflake' but she still doesn't understand. I ask if she's every had to work between T-SQL and MySQL or MySQL and PostgreSQL or Oracle and so on and she says yes. I say the syntax isn't the same, is it? And she goes oh, now I understand.
She scored reasonably in her SQL test but I'm now concerned there's something fundamental missing in her grasp of SQL. I gave her a detailed demo of the tools, I explained in the interview and on her start about our move to a data warehouse for all our apps, and put her through some training plus gave her time to work through our Confluence pages - not expecting she'll remember everything, but more to ensure she recalls they exist and what the general contents are.
Anyhow, that's my rant.6 -
SQL Rule 1. Always assume there are external processes that might affect your data. (for instance, triggers).
SQL Rule 2. In Denormalised data, never execute logic on dependant table values, always copy from the parent.
SQL Rule 3. When Denormalised data schemas are created the DBA knows what they are doing.
SQL Rule 3.1. If DBA knows what they is doing then according to Rule 1 there is no problem with adding in some triggers to maintain data clones as they are created.
SQL Rule 4. If you don't like or agree with triggers, deal with it. They are a first class tool in a first class RDBMS. In a multi-app or service environment there may be many other external processes massaging your data
SQL Rule 5. If all previous rules are not broken and the system has been running efficiently for many years DO NOT complain that there are triggers in the database that are doing and have been doing the same process that you just butchered (by violating Rule 1 and 2) in your makeshift "hello world, look what I can do from my phone" angular BS when the rest of the users are still relying on the existing runtime app.
SQL Rule 6. If you turn my triggers off, you sure as hell better turn them back on!1 -
Using Oracle 10g for our distributed databases practical lab session, and typed many SQL queries in one sheet.
Suddenly this guy came and told shortcut 'ctrl + r' to quickly run selected query.
And the page fucking reloaded and boom, all queries were gone! His evil laugh was more disturbing. 😡😡
Fuck him.3 -
So, part of my job is working with SQL. Not my favorite technology to work with. But the tables have mostly non-descript fields, multiple schemas in the same table, and encoded relationships spanning multiple tables. Yes, the database from hell! On top of that, there is very little documentation on this mess. -- And my boss wants me to write queries against a combination of these tables to make sure the program is working. RIGHT...3
-
You know that you're working too long with SQL Server when you enter your password somewhere and press F5
-
BI dev: Hey, can you help me with my SQL query?
Me: Sure, let me see it.
BI dev: sends screenshot - not even the whole query, literally a screenshot with a segment of text in it. No errors showing either.
Me: ...7 -
In our databases lesson, we are going to use Microsoft SQL Server throughout the year.
This shit's setup fails at random, doesn't even start (empty error box??????) on some machines, and when it, uh, works, kinda, it's a convoluted mess.
Help.9 -
I knew I had found the right group of friends when one of them suggested we try SQL Injection on the instant messaging feature of the bowling alley console.
Unrelated, do people not think, "hmm, that seems like an unnecessary feature?"2 -
The day after I delivered a secure programming course to our junior devs.
Junior dev: I can't figure out what's happening when I generate this sql.
Me: what do you mean generating ... It should be a prepared statement..
Junior dev: no I'm just generating the strings from the form
Me: ... Let's try this again.... -
Conversations with SQL Server:
Me: TRUNCATE TABLE users;
SQLServer: Okie dokie, Command(s) completed successfully
Me: WTF SQL, u didn't even ask for confirmation
SQLServer: Well, you did type 'TRUNCATE' then 'TABLE' then 'users' didn't you. I mean how much confirmation do you need you prick.2 -
This may be the best Stack Overflow comment I have seen when learning SQL.
How old is Frank? I don't know (null).
How old is Shirley? I don't know (null).
Are Frank and Shirley the same age?
Correct answer should be "I don't know" (null), not "no", as Frank and Shirley mightbe the same age, we simply don't know1 -
I have quite a few of these so I'm doing a series.
(2 of 3) Flexi Lexi
A backend developer was tired of building data for the templates. So he created a macro/filter for our in house template lexer. This filter allowed the web designers (didn't really call them frond end devs yet back then) could just at an SQL statement in the templates.
The macro had no safe argument parsing and the designers knew basic SQL but did not know about SQL Injection and used string concatination to insert all kinds of user and request data in the queries.
Two months after this novel feature was introduced we had SQL injections all over the place when some piece of input was missing but worse the whole product was riddled with SQLi vulnerabilities.2 -
I'm getting really good at SQL, last year it appeared me to be very difficult but finally, it's easier than I thought4
-
I thought SQL was supposed to be very easy? I'd like to jump off a balcony right now because of it ...
I don't know if I'm just dumb or if my sources for learning are bad or idk
maybe I'm just tired and dislike SQL2 -
Wondering why your form isn't submitting any data to the db.
Spending half an hour checking all POST-Variables and functions in your script multiple times to see if they give the correct values (they do).
Finally realizing you wrote 'INSERT INRO' in your SQL statement.
Questioning your intelligence for the rest of the day.6 -
I feel ridiculous. While learning SQL databases I ran a query that was supposed to fill up the database with test data for me to play with. The actual result?
8 GB and 330,000+ rows.
Keep in mind this database is on a remote server, so trying to delete it times out after thirty minutes. I’m submitting a ticket right now.4 -
What is it about SQL that invites people to do things in utterly ridiculous ways? The amount of pointless repetition and complete lack of clarity in the query scripts I get handed is irritating at the best of times - without any documentation (or even a bare comment sometimes) how am I supposed to work out what you were doing?3
-
Please, please for the sake of your born/unborn child, check whether the names of the entity attributes are not valid sql keywords.4
-
Made a SQL query wich perfectly worked. Than added one collumn to be selected and everything is shit.
And the worst is I still don't know why! Ò_Ó2 -
Oracle SQL Errors are an absolute fucking joke, ORA-GO-FUCK-YOUR-SELF.
Thank you for coming to my ted talk.2 -
Creates PHP scripts for development SQL server, pushes to production to find out the schemas are different. *face palm*1
-
I never knew that I was a good mentor at SQL , specially at PL/SQL.
I gave a task to a new member of my team, to fill 5 tables with data from other 15 tables.
I informed him well about data table info and structure. He spended about 3 days to create 25 different queries in order to fill 5 tables.
After I saw the 25 queries, I told him, that he could do it with 1 main query and 5 insert statements.
So I spended 1 hour of training, in order to build,run and explain how to create the best sql statements for this task.
(First 5 minutes)
It was looking so simple at the beginning from starting with 1 simple join, after some steps he lost my actions.
(Rest 55 minutes)
I was explained the sql statements I 've created and how Oracle works.
Now , every time he meets me, he feels so thankful for learning him all those Oracle sql tips in 1 hour.
Now he is working only with big data and he loves the sql.1 -
Ok so I was fetching some JSON data from a SQL database server and loading it on the front-end. Every single data is being loaded onto the table except for a single data column, which is empty.
Hmmm... So I go and check my code... everything looks fine.
Then I console.log the JSON (using .stringify() of course), all the values from the table are present in the printed out JSON.
Ok, now I am really pissed.
Long story short...
I had misplaced a single 'i' in the SQL statement, I had included the 'í' (the i-acute) character instead. And since I was using an alias in the query statement, no error was shown.4 -
Just came across this gem. What's wrong with it??
Yes, the threat of SQL injection here is a legit response, but in this particular case that's not the answer I'm looking for.
Hint: This method gets called a lot!15 -
Any good resources for sql?
Im getting heavy into databases. Im a noob but i need to reach top level quickly.
Im gonna buy 1 oelr 2 books. Im leaning towards oreillys “learning sql“.
Any suggestions?11 -
Whole class: makes an sql database using phpmyadmin. Simple, easy, meets the requirements
Me: fuck it. Use python with pyqt5. And Microsoft sql server Spend unnecessary hours on making repetitive functions, cause my stupid ass can't figure out how to pass more than one parameters in class methods.
All in all, it looks good. I feel like I did something, learnt something new. Took on a challenge. Its a wierdly good feeling, somewhat rewarding.5 -
Running SQL Activity Monitor to find inefficient queries. According to legecy team this is how they think they should query SQL 2014 for a customer.10
-
INSERT INTO not_rants ("
Today I took the time to learn the basic SQL(ite) and just finished learning in depth about the art of querying.
I just had to do this, because I am very unsatisfied with the way we learned it in school. Almost literally only translating the words CREATE, TABLE, SELECT, FROM, WHERE, UPDATE, DELETE in MySQL.
Funny, irrelevant fact: Before I could download the meme below I encountered this beauty of an errorlog:
Value of '∞' is not valid for 'emSize'. 'emSize' should be greater than 0 and less than or equal to System.Single.MaxValue.
Parameter name: emSize
https://cdn.meme.am/cache/...
");1 -
Starting out as a developer: I don't know why people are so stingy about tags on Stack overflow
Now: This guy tagged this question with SQL Server but is asking about Postgres I don't know how to help this guy out2 -
When used properly No-SQL databases are an incredible resource but my employer keeps hammering them in problems which could better be solved by traditional SQL databases in an attempt to be more "hip" and "cool".
This causes huge PITA in making the database work properly with the ORM we're using and waste of time since we're force to emulate basic features which are already exists in almost any SQL database (i.e. relational integrity) using No-SQL storage.1 -
Does anyone else find it super-confusing how Microsoft refers to SQL Server versions by both product year and version number?
For instance, we primarily use SQL Server 2012, 2014, and 2017, which are versions 11, 12, and 14 respectively.
The slight mismatch between the product year and the version number creates a lot of ambiguity. If someone refers to SQL Server "14," we always have to double-check: do you mean 14 as in version 14 as in 2017, or 14 as in 2014 as in version 12? Does SQL Server "12" mean 12 as in version 12 as in 2014, or 12 as in 2012 as in version 11? It's ridiculous!3 -
I'm interviewing with the data architect in two weeks' time, a self-proclaimed ninja. The chap has done PL/SQL development on SQL Server 2008 according to his LinkedIn profile. Yeah, okaaay...5
-
(I highly recommend to you to not read this, it's just something that I had been wanting to take off my head; seriously, if you want to read it, do it at your own risk, because it will be a huge waste of your time)
Oracle Academy is the worst crappy attempt from a Corporation to create a learning platform.
The directive and academic personnel of my faculty decided that it could be a good idea to teach SQL and PL/SQL during whatever online classes will last with Oracle Academy, and I truly strongly believe (including most of my friends and classmates) that it's one of the worst ideas that could be done.
At that platform you simply don't learn shit, you read page by page of shitty PPT-like PDF presentations (that most of those are from a decade ago and other from 5 years ago) that are a pain in the ass to read due to how poorly formatted they are or how it explains badly certain concepts due to how badly made some explaining examples are, and then at each section of the "Learning Course" I have to do a Quiz that asks theorical questions and tells you to make certain code reviews to see if something is wrong or not (also which they are just alike the presentations, poorly formatted, up to the point that those have many syntax errors that end up consufing anyone a lot) and the main problem with the quizes is that also the Oracle's PL/SQL Docs are so fucking badly made, that I have to check PDF by PDF and page by page the concept that I just forgot to see how to answer the goddamn question; I mean, there are Doc pages that are way better structured and obviusly external to Oracle, but not even those pages fully cover certain SQL and PL/SQL concepts.
Seriously though, who could be so fucking ill-minded to create a shittyful learning platform and not try to fucking improve nor enhance it at least every 2 fucking years, so the goddamn "learning" process isn't that stressful.1 -
Looks like copying large file e.g. 1GB from Remote Desktop Connection will also affect SQL Server performance and somehow slowing down the SQL transaction 100000x times
What a new thing to experience😆5 -
I hate those questions like "where do you see yourself on five years?" Or "tell me a time when you had to [insert leadership activity here]" where the obvious answers are something inane and managerial.
I also hate those questions that come up a lot when I say I know SQL where they ask me to do some inane, unnatural SQL thing in a statement rather than a procedure or a function.
Also see these: https://devrant.io/rants/136331/...
https://devrant.io/rants/132198/... -
Company A: Oh yes we work with this huge tech company all the time and our APIs are just amazingly well made! DONT WORRY!
Company B: Yeah we've worked together once or twice and nothing seemed to go wrong the last time. DONT WORRY!
Reality: 11 API warnings, no data transfer and a SQL error meaning nothing I've been working on actually worked. #Rantover2 -
Who has replaced a dot with a semicolon while composing a SQL query in php? Me. 😤😤😤😤😤
Two hours spent in fixing everything and a sleepless night.8 -
I just dealt with a 3 nested "if" statements in SQL. There is no indentation so I am quite frustrated since each "if" spans up to 2-30 lines.
I now understand why Python white space is significant3 -
Yesterday, microsoft showed me once again, what it means to "obey".
I tried to install Microsoft SQL Server 2012 on a virtual machine with OS Windows7.
The installation-center asked me to choose an installation-folder for SQL-Server.
No matter what, for any folder i had chosen for the installation, the setup replied with the errormessage "The installation-folder is invalid"
So i considered asking our platform-services team, whether they gave me administrative rights for the vm.
They did. I had full access to the components of my vm.
After a few days i finally recognized, that i had picked a wrong iso for the installation of sql server.
Instead of sql server 2012 + Service Pack 3, i picked sql server 2012 ServicePack 3.
So after all, Microsoft tried to tell me by showing the message "The installation-folder is invalid", that the setup weren't able to find an installation of Microsoft SQL Server 2012.
God damned!!1!3 -
dude 1: Why is the sql sentence so slow? How can I improve it?
dude 2: buy more ram memory to database server2 -
Following on from my previous SQL script to find prime numbers
https://devrant.com/rants/2218452/...
I wondered whether there was a way to improve it by only checking for prime factors. It feels really dirty to use a WHILE loop in SQL, but I couldn't think of another way to incrementally use the already found prime numbers when checking for prime factors.
It's fast though, 2 mins 15 seconds for primes under 1,000,000 - previous query took over an hour and a half.5 -
Couple of SQL databases walked into a "noSQL" bar.
But after some time they walk out...
As they couldn't find a Table... :) -
Any advice on some good SQL book or resources?
I need to start learning DB designing and theory.
I know jackshit apart from the basic commands.4 -
Well well well.
Story time.
Since we are working from home for the past 4 months, I finally decided to install a Microsoft SQL server on my home server. (Mostly was using Azure)
My server is running Windows Server 2012 R2.
Tried installing SQL 2019 : fail, 2016 : Fail, 2012 : Fail. Some obscure message about some DLLs not being at right version. (And a warning that it is no recommended to install SQL server on domain controller, but I know, it is my home setup, not roduction)
“Ok fine, I’ll install it on my PC instead”. Windows 10 PC. NOPE. “Cannot install on a compressed drive”. Welp, wtf ? (Of course you cannot select destination install folder, I could’ve put it on another drive).
So here I am. Working 100% on Windows, installed Ubuntu server 20 LTS in Hyper-V, Installed Microsoft SQL server on it (BTW, install is very easy compared to windows). And that shit is working. And new “Terminal” app does support SSH out of box, no need to add Putty !
So as a Windows user, I needed Linux to make Microsoft SQL techno work.
Nothing will ever surprise me anymore. (BTW it’s fucking fast. I like SQL server on Linux)2 -
Today salesmen gave me some recommendations about my "so hardly optimized" SQL queries..suggestin me to change em.. I said okay, let's execute these.. 10 hours later, their computers sql workbenches finally displayed the fucking first one.
Result: 0 row... 🤐2 -
We have so much pl/sql at our company and it really sucks because the "young" generation of devs must convince the pl/sql guys to switch to some more powerful and newer languages like java.
But not everyone wants to use the new stuff or learn anything new. I mean there are some programmers who really appreciate that there is new stuff. They have no problem learning from the younger generation. But some of them just resist any change in that direction, and thats the much higher amount of devs.
Does anyone of you have such experience? What can i do against that?
Is that some kind of "i am too old for this"-trip?13 -
My Technical lead always asks one question to new interviewing candidates. "Write a SQL query to find the second highest salary from employee salary table". It's the same question which he faced in one interview and he didn't have answered it.
Sorry for my bad English..3 -
Any code should be simple and easy to read / understand.
I just reworked an old stored SQL proc.
Went from 102 lines to ... 10.
More I code, more I realize that maintainability, readability, comments and unit tests are more important than actual code. (And performances ofc. But if 1 line code does it in 1 second and 500 lines code in 0.2 seconds, I’ll take one line solution every time)5 -
Just saw this question on quora asking if saying ess-kew-ell is an indication that someone doesn't know SQL. I say SQL because there's no goddamn ee or kwell in there YOU'RE ADDING LETTERS THAT AREN'T THERE BUT SOMEHOW I'M THE MORON?!?!?!4
-
Part of my job requires me to use SQL in SQL Server and databases and Python and utilising Javascript APIs - so I was thrown in at the deep end. But my fiancé is also an amazing help as a software engineer he helps to spot my errors and encourages me to take on new challenges.
-
Captains Log:
Day 2 of trying to get SQL database to work with JDBC application.
I've built a try/catch method and it throws up the message that IntelliJ can't find the JDBC driver.
More research to be done. My first officer duck buddy has no input for me.
It's going to be a long day.17 -
I've alway pronounced it sequel but everyone I know swears it's SQL, so I say that now to fit in.
I feel like a spy, lying to my closest friends everyday...2 -
Today is SQL day.
Been some time since I had to go here, the queries are flooding back to my mind like water over a dam wall. How the heck I remembered these is what I pondered.
Oh well, back to SQL (at a client - yay).
Now you SQL me, now you don't. -
When it comes to choosing a database, What is the best for a Java project?
1.SQL - MySQL
2.NoSQL- MongoDB11 -
Can't create a new SQL database on Azure on on one subscription as every region is unavailable. Everything works on my other subscription.
Fucking hell.1 -
1 problem down, 3 more show up.
I love SQL.
In other news, client won't send data to utilize, so I must fill in dummy data.
How's your day? -
I made changes to an SQL view used as the source for a pretty important integration that is built and managed by an external company. The integration failed the morning after and I was immediately blamed by the company and heard "how could you be so careless" and "how long have you worked in this business". I've been a programmer for 20+ years and done integrations for 15+ years. I know I checked the output of the view and it was identical in every way to before my changes.
After finally getting access to the integration code on "the other side" I found that it didn't read from the SQL view - it read the view definition. It also uncommented anything in the view (yes, uncommented) and ran that query.
We now have a year free of charge - which we won't need because my boss is throwing the company out as soon as we have a replacement.2 -
Can any sql guru take a look at this problem?
I try to select number array from a JSON object, but have no idea how to do it.
https://stackoverflow.com/questions...5 -
That feeling when you debug the Users table in sql, which has a Password field encrypted with hash, but most of the demo users use the same Adminadmin password, so you recognize the other users password because you rembered the hash1
-
SQL Server Management Studio: I noticed you forcefully closed the application. Do you want to recover the queries you were working on before you closed?
Me: No
SSMS: Well here you go anyway
Me: *spends 5 minutes recovering and closing files*2 -
I once saw a DBA using two for loops in PL/SQL to join two tables. I wonder if he knew about the "alternative" way to do that...2
-
Life of an Oracle Developer ... Day {I've lost bloody count now}
Task: Optimise a 236 line cursor consisting of 7 SQL SELECTS and unions, 39 joins and nested sub queries galore.
"YAYYY" said no one ever ...3 -
SQL collation conflicts are the worst thing that has ever been made possible in humanity... it's 1000 times worse than problems with time zones, change my mind.
Fuck off whoever decided to make hundreds of different versions of the same languages.1 -
Me : So cool ! My new graphQL APIs are working so good !
Also me : ‘order by <text field> take 50 skip 10000’
Me : Hmmmm.. 2.3 SEDCONDS ?! WTF. Let’s add an index !
SQL : Sorry bro, can’t add index on nvrachar(max).
Me: OK. Here you go, you are nvrachar(128) now. Add my index !
SQL : Ok
GraphQl :<same query > Here : 90 milliseconds
Me : ‘order by <text field> desc take 50 skip 10000’
GraphQL : Sorry bro : 3 seconds. (Yes, slower than without any index)
Me : Do I fu7cking need to manually add ASC and DESC indexes ? WTF IS GOING ON !
I should’ve learnt a bit more about databases. ☹. And now I don’t have time to refactor a prod database as “needed” .
/me needs to buy DB audit. Company is still a bit small to have a DBA full time.6 -
Got my “Certificate” for SQL. What do you think? I have a few other just not sure if this means jack squat despite it being a free “certification”.9
-
I've always found it funny when sql errors "at or near" a character. I don't know enough about sql to understand why it does that (although I'm sure there a reason!)....but it just sounds like it's not trying hard enough 😂
Maybe someone smarter can explain?1 -
I use mySQL workbench on a daily basis, but I've been having issues with the dark GTK theme not working well with Linux. Should I do a workaround to get workbench to use a light GTK theme, learn to use SQL from the CLI, or go with a third option?16
-
copying field data from one table to another,
wondering why the execution takes so long,
since your copying only data from three rows,
realising you forgot the WHERE clause in the SQL while working on a live database and overwriting all data with the last statement 😨6 -
Is there ever any reason for SINGLE Hibernate SQL query/template to join like 10 different tables, do math, and come out to like 30 lines?
This is not a stored procedure, it's a single SELECT2 -
So a SQL server walks into a bar to grab a drink. He gets his drink and spots a table with two people sitting down with a spare chair. So he walks up to them and says "Hey, can I JOIN you two?"1
-
Learnt a lesson today:
Never try out new hotkeys in a SQL query editor window.
Or if you do, at least make sure it's not connected to anything important :)
I was trying out new hotkeys and accidentally executed a SQL deploy script to rename something in multiple stored procedures in a large system.
Thankfully - so I saw after my heart stopped - it was only our QA db so not too bad, just a couple of devs set back.
Who woulda thought ctrl-l would execute :O -
i am not a SQL expert, but i can do what i need to do in order to be considered a full stack dev
the syntax i have to learn was deprecated before i was even born -
Should I learn a database language before backend, or vice versa? I’m thinking that I learning Rails and some form of SQL.2
-
Today I had to explay to a new developer, gradueated in Informatic, that our 15 year old php application uses global variables and strings as sql commands.
It seem to force someone to prostitution.
It's just like to drive a ferrari using a double-clutching because the gear is not syncronized.
I was shamed.3 -
First exam this year, about database optimisation. I have been there just a week and I really enjoy this school
BUT. THIS. CAN'T. BE. TOLERATED.
I wouldn't wish my worst enemy to write SQL on paper goddamnit!!!!
(Yeah I didn't have any other pen that this red one, at least it was erasable)7 -
Are sql joins a bad practice? :o
I recently did some work on a page for a site ive never worked on cause my boss told me to. So they recently added product detail video urls to a table that has a relationship to the products table. The existing code was querying for the products on that said page and then during the loop that was outputting the products ,there was another query for getting the url for the current iteration/product. Told my coworker that this imo was pretty inefficient way to do it and switched it to a join and did 1 query then output that but his words were "The way it is now maybe ineffecient in your opinion but it works. Also combining inner joins with left or right is not a good practice. If the data is changed upstream the entire query would need to be redone to accommodate the change". Mind you that they query views a lot which are all made from queries that use joins and I'm also pretty sure these views were written by someone who used to be here because these guys are not good at sql or at least that's what there queries show. I'm at the point now where I'm realizing that my boss and this other guy don't give a fuck about efficiency or doing things the right way they just want it "to work". So this coworker changed my query back to the way it was because he said it broke the shopping cart even though that was already broken when I started... What is life? Maybe I'm the stupid one?7 -
I was reading a few interesting postgreSQL solutions to constrain polymorphic tables (anti-pattern, I know) when something caught my eye.
Some solutions were looked down upon (or looked favorably upon) based on their portability to other rdbms like MySQL.
Is that really so important? I get it, if somehow you decide to change from one to the other for some god-forsaken reason it will make the switch easier. But really, how often will that happen?
I feel there is a tendency to just avoid using SQL beyond the basics.5 -
Knowing SQL does not mean knowing all the existing technologies that uses SQL, motherfucker! Stop bragging around that you know Postgres, SQL Server, Oracle and shit.
IT is full of shit talkers and ego, NNNNNNNNNGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH10 -
Gosh!! Do not want to look at my shitty face in the mirror when i get to know that there is a DESC syntax in SQL for sorting data automatically even after i manually finished sorting them in Php.. #Fuckmylife #newbie5
-
I've solved hard problems before, and used languages other than Java, but for some reason I don't know how to start using SQL. I couldn't find a SQL IDE. Any suggestions on how to start working with SQL on a Linux computer?6
-
When your about to start development on some tickets you've been wanting to finish, and then MS SQL management studio poops out and you have to spend the entire day re-installing/fixing your SQL DB's... Oh and now behind schedule1
-
A SQL statement goes to a restaurant ... there he sees 2 TABLES and asks " can i JOIN u two guys ? " :P
-
Tomorrow I'm forced to attend an in person "advanced SQL training", nothing against SQL or my company's good intentions but it's naive to expect which people would retain much after a single, super intensive 8 hour session.3
-
Three hours of debugging the program.
I also wrote a thread in a forum to ask for help explaining all the test I made.
My database is working in Sql Management Studio but not in the code. It done well only using the trusted connection.
The issue? I was using the windows note (Win+v) to paste the connstring since the beginning and in the string there is a / instead of \ in the instance name. I'm writing here to not smash everything...1 -
Saw the following SQL in an SP at work:
Type_ID = CASE Product.Type_ID
WHEN 1 THEN 1
WHEN 2 THEN 1
WHEN 3 THEN 2
WHEN 4 THEN 3
END
Seems a little bit redundant to me :-)...1 -
Wow...a talented developer created a 3 via SQL execution plan. The query runs like crap but the execution plan art is pretty.
-
I was scanning over a dreadful code base I had to work on and found SQL injection vulnerabilities. THE SITE WAS LAUNCHED IN 2017!!!! 😢2
-
I thought Notepad++ was the one and only text editor for random small tasks..
I wanted to check a 280MB SQL file if it dumped a specific table.. the file never opened, and now npp is stuck in "Not responding" :)9 -
Silly question, but why is it that in this age of 64-bit computing and gigabytes of RAM applications still have trouble with text files/SQL dumps over 1MB in size? Surely for something so simple it should be able to store it all in memory without any issues, no?9
-
How long do you guys tend to keep SQL migration scripts around?
Obviously they don't use up much disk space, but they do start to create clutter in a project4 -
"So... you know SQL? Great!! Here, I have this project for you to fix a few things."
"What is it?", you ask... SSIS packages and stuff!
Where do I start??!! -
Spent 2 days optimizing SQL queries, and then I learned a valuable lesson.
If your database size is bigger than the RAM of the machine it’s running on, every query will take 5+ seconds ☹️4 -
MFW I, a junior dev who just started have to explain what sql injection is to a senior IT person... It's not like I'm an expert in the field, but a little bit of expertise would be nice2
-
Found an infinite loop in SQL. One proc called another and then that one called the other. Woooooo.....
-
We had a test in class where one of the questions was "What is SQL injection?" and I wrote what it was and even gave a bang on simple example where I showed how you could end up with a truncate statement on your customer db. The last part of it was:
"This will be the SQL that gets executed:
INSERT INTO Customers (Name) VALUES (' ';TRUNCATE Customers;--);
When I got it back after we had a session of "grade each others work" I got the comment: "What makes this an attack against a database?"
I mean, I'm not sure what I could have written. That it truncates the database? And, correct me if I'm wrong, but if a user truncates your DB, is that not an attack? -
I basically hate anything that IDEs aren't smart to fix typos.
- JavaScript, but usually not TypeScript
- Python
- SQL, mostly.4 -
I recently heard someone pronounce SQL as "Sequel". Is that actually the correct pronunciation? Have I been saying it wrong all those years?9
-
Why it is such a pain to scan nullable types on Golang database.sql
Now I have to chose between:
1- Using temporaty variable to hold the nullable value just to soon after check and set the zero value if it is null
2- Adding coalesce to my sql query for the zero values.
Did I mention that there are around 20 collumns that are nullable...1 -
Hey all, can you guys recommend some great books on database theory and design. Something aimed towards intermediate towards advanced. It doesn't have to be sql, I just want to learn how to make a kick a#@ db.
Thanks!!!!!!!6 -
It’s 14:30 and I’ve only just opened SQL Management Studio and Visual Studio after being at work since 9am. Sometimes I hate being a team manager... so much shit shovelling and not enough fun work1
-
Was just fucking around with MyBB in order to figure out how it works on the control panel - whatever, right? Install a crap ton of plugins, and quite a lot of them wouldn't install due to an SQL statement being wrong. I check them, and either:
- the plugin ID is specified (it's auto-increment, it really shouldn't be specified at all)
- the database expected an integer and instead got a word
like for fucks sake, it's either 1 or 0 for being default, yet a lot of developers PUT YES OR NO?? HOW IS THAT EVEN REMOTELY AN INTEGER WHAT THE FUCK
So that was my past hour, running through plugin files, finding SQL statements and altering them. Safe to say that for what I got out of the plugins, it really wasn't worth it. -
WHY THE FUCK EVERY DAY YOU SEND A NOTE TO THE CLIENT TO TELL THEM A SQL SERVER JOB RAN.....!?!?!?!?!?!?
Seriously....no automatic messaging....FROM THE FUCKING IN BUILT SERVICE...the fuck is this manual life that people love to promote. -
I don't know... I'm very sceptic about JPA. I worked on a project using this technology and having much trouble and now I'm working on the second one, but sincerely I prefer the standard SQL approach. What do you think guys about this framework?1
-
Pardon the rant; some of it can probably attributed to me, but please indulge me of you could.
I'm tasked with creating a report that pulls data from some sql tables in c#and presents it using javascript. My manager was nice enough to lend me his old sql query, so I run with that using sql connections. Now I find out AFTER I get my sql query string working and retrieving data properly that my manager wanted it done using linq and entity framework, so now I have to start over, a process made only more "fun" by the confusing and unintuitive column names of our sql tables.
Moral of the story: don't take the easy way out.
After I spend some time fixing that up, I have to print out the data using javascript and html, which my manager was kind enough to lend me. Cue me shutting off my brain and thinking that I should have the program open and display this stuff itself. Let me tell you that converting a console application to a Windows form application is not a fun experience, especially when entity framework makes classes named "application" and "form" from your database tables. After finally getting the WebBrowser form to work, I'm hit with a javascript error from the library my manager referenced (he is a programmer himself). I tell him about the error and he just tells me to write the html code to a .html on disk like he did, but never explicitly said he did until just now.
Fixed moral of the story: don't take the easy way out, unless you should.
I should clarify I was given the whole raw sql query and html with some embedded javascript and a reference to chart.js. -
I wonder if I should add to my bachelor thesis' implementation report that I had trouble setting up my SQL init script and lost around a day because I made a typo in a table-name and therefore my foreign key kept fsiling for unknown reasons 😂
-
I started a project to practice and familiarize myself with SQL more and Entity Framework Core and prove how much I’ve learned from reading this book.
It was originally gonna be small program with a small database but over the course of me designing the database I thought of more features I could add. It’s been awhile since I’ve had a project and it feels good to have one.
Right now I’m only messing with SQLite but since the position I want to apply for asks for SQL Server I want to mess with that eventually.5 -
So my school forces me to take a partner in my project. I build him skeletons, give him examples and wait to see what he'll do. He was supposed to do CRUD for text messages in SQL database. In the update and delete functions, he does this:
UPDATE Message SET (values) ...
WHERE username=@username
Yup ... -
Hello DevRant. I was just recently introduced to the community so greetings, good to be here. I was looking for the earliest versions of PHP and SQL if anyone has access to them. I don't think they are on their website. Any help or response is appreciated. Thanks25
-
Embedded database is so lack of choice. SQLite, might be best, if you want stability / ACIDity.
Again, SQL means normalize everything, if I've ever want to index it...
Then, ON DELETE CASCADE? TRIGGER? Also, MANY-to-MANY kills.6 -
Microsoft: Do you know dateadd from SQL?
Devs: Yes of course.
Microsoft: Well you can also do that in our brilliant DAX language.
Devs: Ohhhhhh.
Microsoft: It only works with a special date table, though, and it doesn't work with a non-continuous set of dates, so please don't filter too much.
Devs: Please what??? 🤯😵
Why Microsoft, why? -
How hard can it be to let sql just multiply some values and sum the results, right? As it turns out, damn hard!
I hear you thinking, surely you can just do select SUM(price*amount) AS total right? Nope! I mean, yes you can, but it fucks up. Oddly. It always ends up giving me wrong results. Always. Wtf sql? And it's not like I'm running a massive dataset or anything, it's like 100 records at most?28 -
I have done a fucking awful thing and its that I started a project and I'm using Flask and SQLAlchemy but the part I'm stuck on is something Ive never done in regular SQL, so I cant even communicate what I want to do properly.
Time to binge some SQL real quick. -
I am in need of a good web host for my personal website... the one I use now is free and therefore sucks. I can't even get external access to the MySQL database and their SQL client sucks.9
-
I've never had any use for Pythons tuple unpacking until today when building objects from SQL selects. I always thought it was kind of a lame feature, now I think it's awesome.
-
> me: trying to explain to a dev from one of our customers why should they worry about sql injection in their application -which by the way is public- since they always concatenate params (even giving concrete examples in their app on how could I gain acces to their database with just a couple of queries)
> me: (thinking) Did I change my bed with a time machine by accident and got myself into the past?
Do these things happen often to you? (U_U||) -
bcp in SQL Server can't export column headers. WTF?! Spent hours trying to find a solution that doesn't involve me typing all 250 columns.
Still haven't...1 -
I wrote a whole article about it, and oh wow, it still exists. It was probably the first optimization I ever did in my life, and it was while I was learning SQL.
And writing an edu-tainment article aimed at total laymen as well as beginners was also fun.
http://swczdev.blogspot.com/2010/...
Sadly, czech language only. But... the english autotranslation actually looks readable:
https://translate.google.com/transl...
Long story short, though: 4 or 5-table join going from 7 seconds before optimization, to 0.08 seconds after optimization. Both were written by me, the optimized one was written without any reading on how to optimize SQL, based purely on me actually stopping to think about how I can reduce the DB load based on the little that I knew about how SQL servers work.
Optimization made it about 99,9999422% more efficient, based on my improvised efficiency metric of how many rows the query retrieves and produces versus how many are thrown away on the end due to the WHERE part of the query.
And that was also the day when my question of "what is there even to optimize in SQL?) was answered... by myself.3 -
- C# call to SQL Server takes forever.
- Running the same sql in SSMS is nearly instant.
Please SQL Server God, grant me strength to understand your ways.3 -
Colleague: I can't restore this backup file!
Me: What version of SQL Server are to restoring to?
C: 2016
M: Should be fine. How did you get the version?
C: * opens SQL Server Management Studio, clicks Help > About *1 -
So I was stupid enough to make the same mistake for 5 times in a row within the same hour, simply the same sql query to get something from a table which doesn't exist because I didn't even run the migration.2
-
Every time I see SQL scripts with cursors...
C'mon man. Set based operations are way more efficient.2 -
When you open an access db in visual studio so you can do sql querys with out the annoying access interface and then i realize visual studio uses the same interface as access except its worse *-*3
-
When you open a SQL File and you just here Maligaro whisper in your ear: " do you know the true face of nightmare, exile?"
-
I was writing a db on sql and I accidentally fucked up the key column.(as you can see in the pic) No, I didnt used AUTO_INCREMENT.
Is there a wei to make this right, other than doing it one by one?3 -
I really love how quick it is to get data from SQL with Djangos ORM. But heaven forbid I want to do a WHERE EXISTS clause. Comparing against two tables should not be that hard....1
-
You know what's more fun than debugging a SQL stored prodecure?
Debugging a SP which CATCHes all errors and instead returns an error code. Because exceptions are scary... -
F-word with three consecutive U-letters! SQL Management Studio just crashed, just when I had finished a nice script, that I hadn't of course saved yet. I must say SQL Management Studio hardly ever crashes, can't even remember the last time that happened before this. Wonder if it has anything to do with the plugin SQL Complete that I installed just recently? SQL Complete also has the annoying habit of displaying a popup every time SQL Management Studio is started, with a delay just long enough so you have already got started with something when you're interrupted by that popup. No, I'm not going to upgrade a piece of software that behaves maliciously!15
-
Sigh, what is it with these cowboy SQL Devs? Why the fuck is this a pattern for anything?
New contract, new idiots, sigh.
EDIT: Had to change picture because Prod is different to Dev (but no dev has been done since release....smh)4 -
Is there anyone here who is expert in Microsoft Sql server. Am getting error while connecting to local database.8
-
I absolutely hate it when people pronounce MySQL as MySequel but I have no problems with people pronouncing SQL server as Sequel Server. It's a weird world.1
-
Inherited a legacy system from a previous "developer" who wrote code to sanitize input from sql injection in the front end and then called an web method called execSql which accepts am sql statement in a string value!
Obviously the app ran under admin privileges.2 -
SQL is amazing.
I'll toss out some bassakwards query and the optimizer will make sense of it and suddenly I'm searching a amazonillian records in no time.
Then rando one day (today) I fire up what I think is really not the most wonky query I've ever written and ... "Well shit this is surprisingly slow."
So then I go full n00b and add some fields to the query that I know would limit the number of possible records to way low thinking that might help and ... nope no faster...
Guess it's time to bust open some books about SQL....4 -
Why is the syntax of SQL INSERT so completely different to the syntax of UPDATE?
...proceeds to rewrite multiple 60 column inserts into updates...2 -
When you deliver a site to a customer and find out that you forgot to prepare all the statements so that the website wouldn't be vulnerable to SQL injections. So yesterday I forgot to add that, had to close down all the connections to the website and rewrite all the statements. Everything is good now
-
I’ve always wrote my own class to sql methods, but I used the Table Adapter in C# and I don’t think I will go back.2
-
I got a report of a relatively simple WinForms app created by a senior (!!) developer who left just as it was released taking 3 minutes to load.
Step through it.. Narrow it down to one stored procedure.
Open said query, every join is a left join.
None needed to be a left join.
Change them all to inners, app now loads in 5 seconds.
Left Joins: For when people can't be assed to learn SQL basics. -
Week2 day 1 of beeing in the database team to learn more sql. Turns out the task they want me to complete is rather easy. So this is day 2 of doing exactly nothing.
Also im not allowed to do the task all on my own since the other apprentice has to learn it too.
These short blocks never have any challenging tasks to do *sigh* -
I hate pl-sql and data warehousing. For this project we're extracting from source tables using a generic method equal for every student, changing the data and then copying to a table for analytics.
Everyone's project is fine. Mine occupies 90mb and exceeds the quota already. Delivery due in 2 days... So much for that cs grad. FML. -
When I see job adverts asking for SQL skills it really puts me off. After seeing how database migrations and eloquent in Laravel work I don't know why anyone would write SQL queries again!8
-
I have 2 server that run in production that using SQL Server Developer Edition and SQL Server Standard Edition.This was setup by shit people before they all resigned from the company.
I need to upgrade both server to Enterprise Edition.It give me a real pain since both server is on production side now.
Is it possible to upgrade it without any error or long downtime?3 -
LEARNING QUESTION
I have been learning a lot of coding, front and back end web mainly (a touch of C# and Python but trying to keep my focus on web for now).
I am wondering where is the best place to learn about integration of SQL into other web programming (PHP for example).
Any tips are greatly appreciated.1 -
TL;DR Is there a hackerrank for Oracle PL/SQL?
At my work, we do not get raises, we only get promotions. Promotions are applied for, and then interviewed for. Highest score (plus maybe some managerial bias) wins.
33% of the questions revolve around PL/SQL (and just Oracle DB in general) and the better you explain yourself, the better you score.
Tutorials just don't do it for me. They're boring. I want something interactive. While it doesn't need to be competitive and challenging like hackerrank, I'm looking for something gamified like hackerrank where I can see other people and learn the technology intimately so I can climb the ranks at my company faster.
Does anyone know of something sort of along the lines? All suggestions appreciated.4 -
had a uni exam in databases (just closely didn't make it😒)
it didn't even have sql in it!?
questions about ER diagrams and draw a diagram, functional dependencies with given dependencies, find candidate key and what not, work on a b-tree (miserably failed😣), datalog (who the fuck cares about datalog? the least expected topic) and transaction management/serializability
whose idea was it to not include sql?? isn't it one the fundamental parts of relational databases?4 -
The guy was trying to upload MySQL into a PaaS SQL for last 1 week.
Me: Its SQL not MySQL
Guy: Yeah its PaaS, it works with both. -
Newbie here, is storing json in sql (as like column data) as weird as I think it is or are there valid use cases?
The one I heard, didn't get the details but something like "startup move fast"12 -
What’s the appeal of Microsoft SQL Server 2019 over something free like PostgreSQL or MariaDB?question windows servers windows sql server sql microsoft mariadb database mysql microsoft sql postgres postgresql6
-
Does anyone here really like typing SQL? I mean just typing queries all day long? Are touch typing and sql related? Next on google: How to build a backend app with only sql?9
-
I'm doing a code review and, it's not unheard of to have lowercase SQL im our codebase even though most of it is uppercase. For this reason I decided to let the lowercase SQL slide even though it makes me cringe so much... That is, until I came to one procedure that was uppercase and in this revision it is lowercase :O I want to die a gruesome way which would be very nice compared to this :O
-
A question guys, I'm looking for a DB client. We are using SQL Management Server Studio, but its way way overkill for a frontend guy like me.
Min Requirements:
- Needs to be simple
- Must support MSSQL
- Plugin support and/or dark mode
- Free and/or not too buggy evaluation (like Sublime or Winrar)
- GUI should be reasonably modern
- Should also be native. Our database is a denormalized mess.6 -
when you find a single invisible character in each of your sql files in visual studio that causes a sql implosion saying
invalid syntax near ''
Sublime Text 3 and other tools didn't help. required manually finding this time, in 20 files..... with an overdue project.
I wanted to burn visual studio to the ground4 -
Wrote some awesome methods in my application which writes products and their variations directly to SQL for a WooCommerce shop, avoiding uploading any images and constant handshakes for thousands of API calls for each product.
Been heavily criticised for it though as bad practice and to just use the API. I say fuck you, it's lightning fast and works well. Sure the API spec could change in a year but these methods will scale well.
Who agrees? -
You guys have any good resource to learn SQL database design with ERDs? All I can find are really Basic examples but nothing that goes a bit deeper1
-
Merging datas using spark sql with two conditions.
my code:
1.merge with first condition
2.merge with second condition
3. 1.unionall(2)
This gives some extra datas(total=10000 and result=10220)
$better way?any way? -
From the guy that practices bash in the production server, here's the same guy who also practices SQL queries in the production's PostgreSQL!
I swear these happen by accident. I'm having to do some data corruption control by some bug, but I forget to close the panel when I'm finished. Then I go on with my tasks and I think it's my own computer I'm writing these commands to.3 -
What's your favorite way to expose a SQL database? Or interface with it?
Using mysql workbench right now and it's a bit much for my users.9 -
When's the last time you've had to write raw SQL? Can you consider yourselves SQL experts even though you only use it through ORM's?9
-
!rant
Got a Job lately and therefore three Interviews.
In two of them was a question about SQL Injektion and no matter what teck stack you apply for that's the time to mention PHP :P1 -
Writing code in SQL Server Management Studio. I miss Vim. And don't mention the "Vim like plugings"8
-
Why has nobody at Microsoft thought of implementing optional parameters for functions in SQL Server? I guess backward compatibility is something they haven't heard of. I mean hell, Postgres can do it easily.2
-
hand-wrote me some gnarly-ass SQL today to resolve a prod "emergency". I was kinda proud that I did so and only had to google syntax once. Then my pride turned to shame when I realized what a spoiled little bitch LINQ has made of me.1