Is it possible to generate a list of all source members within an iSeries source file using SQL? Might be similar to getting table definitions from SYSTABLES and SYSCOLUMNS, but I’m unable to find …
SQL – Temp Table: Storing all columns in temp table versus only Primary key
I would need to create a temp table for paging purposes. I would be selecting all records into a temp table and then do further processing with it. I am wondering which of the following is a better approach: 1) Select all the columns of my Primary Table into the Temp Table and then being able to select the rows
What are the most common SQL anti-patterns? [closed]
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 9 years ago.
Table Naming Dilemma: Singular vs. Plural Names [closed]
Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 8 years ago. Improve this question Academia has it that table names should be the singular of the entity that they store attributes of. I dislike any
Parameterize an SQL IN clause
How do I parameterize a query containing an IN clause with a variable number of arguments, like this one? In this query, the number of arguments could be anywhere from 1 to 5. I would prefer not to use a dedicated stored procedure for this (or XML), but if there is some elegant way specific to SQL Server 2008, I
What’s the best practice for primary keys in tables? [closed]
When designing tables, I’ve developed a habit of having one column that is unique and that I make the primary key. This is achieved in three ways depending on requirements: Identity integer column …
SQL Statement Help – Select latest Order for each Customer
Say I have 2 tables: Customers and Orders. A Customer can have many Orders. Now, I need to show any Customers with his latest Order. This means if a Customer has more than one Orders, show only the Order with the latest Entry Time. This is how far I managed on my own: This of course returns all Customers with
How to restrict NULL as parameter to stored procedure SQL Server?
Is it possible to create a stored procedure as CREATE PROCEDURE Dummy @ID INT NOT NULL AS BEGIN END Why is it not possible to do something like this?
How can I filter out the rows which contain a particular column with null or empty data in SQL?
In SQL, How we make a check to filter all row which contain a column data is null or empty ? For examile Select Name,Age from MEMBERS We need a check Name should not equal to null or empty.
Is there a good reason to use upper case for SQL keywords? [closed]
Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 6 years ago. Improve this question The default seems to be upper case, but is there really any reason to use upper case for keywords? I started