Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you remember/manage your SQL examples?

Tags:

sql

sql-server

I currently have a SQLTIPS.sql file, which lives on my hard disk, at work.

I'll add any new or nice examples, of writing good SQL, to this file. Now it's becoming hard to manage, and I have to search for specifics, in my own file!

I am looking for something that can be loaded in SQL Enterprise Manager quickly, something similar to Visual Studio IDE code snippets.

like image 989
Ferdeen Avatar asked Mar 30 '09 14:03

Ferdeen


People also ask

How do I memorize SQL queries?

So try to memorise the following consecutive statements: SELECT→FROM→WHERE. Next, remember that the SELECT statement refers to the column names, the FROM keyword refers to the table/database used, and the WHERE clause refers to specific conditions that are investigated by the user.

What is SQL explain with example?

An SQL SELECT statement retrieves records from a database table according to clauses (for example, FROM and WHERE ) that specify criteria. The syntax is: SELECT column1, column2 FROM table1, table2 WHERE column2='value';

Where is SQL used in real life illustrate some examples?

SQL is used in everyday life by some of the biggest companies like Netflix, Linkedin, Amazon, Flipkart, Instagram. Uber for data analysis and performance analysis. Even small companies and startups employ SQL for similar purposes. SQL is a great tool for interacting with databases and fetching vital data.


1 Answers

I have each example snippet stored in a separate .sql file, give it some meaningful name, and preferably some comments at top.

I use Dropbox to have it available on all machines I am using, and Google Desktop to search for what i need (the proper comments come handy then)

like image 151
kristof Avatar answered Sep 17 '22 23:09

kristof