Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 1093

Structured Query Language (SQL) is a language for managing data in relational database management systems. This tag is for general SQL programming questions; it is not for Microsoft SQL Server (for this, use the sql-server tag), nor does it refer to specific dialects of SQL on its own.

16 votes

SQL Triggers and when or when not to use them.

In SQL server, triggers operate on a batch of records. All too often developers think they only need to handle one record inserts, updates or deletes. …
HLGEM's user avatar
  • 28.8k
49 votes
Accepted

Why is prefixing column names considered bad practice?

Underscores are not evil just harder to type. What is bad is changing standards midstream without fixing all the existing objects. Now you have personId, Person_id, etc. and can't remember which table …
HLGEM's user avatar
  • 28.8k
3 votes

Is there still a need for writing SQL?

And further if you don't learn the simple SQL in the easy crud stuff, how will you ever get to the point where you can write complex SQL for reporting? … I also see many questions about how to do something using an ORM that the poster already knows how to do in SQL. …
4 votes

What are questions to test a programmers knowledge of SQL?

But one thing I would require of anyone who will be writing SQL is knowledge of joins and when to use a left join vs. an inner join. …
HLGEM's user avatar
  • 28.8k
40 votes

Using JOIN keyword or not

They are deprecated in SQL Server and in fact do not return correct results realiably even in the older versions. … No query that needs an outer join should contain the implicit syntax in SQL Server. …
HLGEM's user avatar
  • 28.8k
0 votes

For user defined data, is it better to use a table of tables or dynamically created tables?

Personally I try to do such a good job of defining the data needs that user defined fields and tables are not necessary. If you haven't defined 98% of what they would need, in most cases that means yo …
HLGEM's user avatar
  • 28.8k
0 votes

SQL Server DBA - How to get a good one!

If you need a performance tuning dba, then ask questions about tuning - find out what they have done and how much it increased performance. Dbas who can't tell you metrics on performance improvements …
HLGEM's user avatar
  • 28.8k
1 vote

Do SQL Devs create SQL queries using SQL Query Designers?

I would never consider using the designer to write my queries. I know my database schemas in great detail (and our databases have hundreds of tables) and don't have to think about how to join to them, …
HLGEM's user avatar
  • 28.8k
3 votes
Accepted

Is this overkill? Using MDX queries and cubes instead of SQL stored procedures

happy because they don't heve slowdowns once a month whe the reports run and the BI people are happy because they always have work to do and becasue they get paid better than someone who just writes t-sql
HLGEM's user avatar
  • 28.8k
12 votes

"Never do in code what you can get the SQL server to do well for you" - Is this a recipe for...

I think it would be poor design to not use the database for the things it is meant for. I have never seen any database where the rules were enforced outside the database that had good data. And I have …
1 vote

Production-safe SQL stored procedure debugging

If I have dynamic SQL that when I use the @debug and in this case I print the sql instead of executing it, so I can check the SQL statement produced. … (Note the table variable temp table stuff is SQL Server specific, I don't know if this will work with other databases.) …
HLGEM's user avatar
  • 28.8k
3 votes
Accepted

Internationalization through SQL Database and performance issues

Foreign Keys are not indexed automatically in SQL Server and I imagine they aren't in most other dbs either. …
HLGEM's user avatar
  • 28.8k
4 votes

Is SQL important if I know ORM frameworks well?

If you never learned basics, how can you expect to start learning SQL with the advanced stuff? You won't understand enough to even start. … ORMs in the hands of a person who understands SQL - a good tool. ORMs in the hands of someone who deosn't know SQL at all - disaster waiting to happen. …
HLGEM's user avatar
  • 28.8k
3 votes

Best practice in application design / SQL authentication

This means no dynamic SQL of any kind (including in procs). That way users who directly access the database can still only do the things they are allowed to do by the application. … There shoud be no SQL Server logins. Instead the users should be in windows groups that are given rights based on what they are allowed to do. …
HLGEM's user avatar
  • 28.8k
6 votes

Databases: Where should the application logic run?

It is just that most application developers aren't SQL specialists. However, is saving the devs time to get better at SQL really a plus? …
HLGEM's user avatar
  • 28.8k

15 30 50 per page