|
I need to add the specific column if it does not exist.
To be more specific I have something like this: IF EXISTS( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'myTableName' AND COLUMN_NAME = 'myColumnName')
but it always returns false....
Started by Maciej on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
IF NOT EXISTS( SELECT TOP 1 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE [TABLE_NAME] = 'Employees' AND [COLUMN_NAME] = ....
First check if the table/column id/name combination exists in dbo.syscolumns (an internal SQLtry this...
|
|
Hi, i'm trying to join 8 tables into one in order to create index used by other application, my query is like : (my mysql skill's very amateur)
SELECT t1_id, t2_name, t3_name, t4_name, t5_name, t6_name, t7_name, t8_name, t9_name FROM t1 LEFT JOIN t2 ON...
Started by lordlinier on
, 9 posts
by 9 people.
Answer Snippets (Read the full thread at stackoverflow):
Depending on how much data is in the tables, you may need to place indexes you're looking for with inner joins?
As i can see, t1 table is the one which is being joined with all the tables, instead of putting them....
From the joins.
|
|
Very quick and simple question. I am running a script to import data and have declared a temp table and applied check constraints to that table. Obviously if the script is run more than once I check whether the temp table already exists and if so, I drop...
Started by FailBoy on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
(And....
Yes, dropping the table will drop constraints, indexes etc that you may have created it - that is typically a lot faster.
Yes - dropping the temp table will drop any internal dependencies as well, including your constraints.
|
Ask your Facebook Friends
|
Under what conditions should you choose tables instead of DIVs in HTML coding?
Started by Krishna Kumar on
, 25 posts
by 24 people.
Answer Snippets (Read the full thread at stackoverflow):
If it makes sense to put it in a spreadsheet then use a table apply the css to make the....
It's about using are
Tables are used for tabular data.
It's not "table" or "div".
Tables vs Divs" thing just barely misses the mark.
|
|
In a multilanguage application with lookup tables, what's the best way to handle translations?
For example for a country lookup table, a US user should see English country names, as a German should see German names. But still their IDs should be the same...
Started by DR on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
Instead of actual text your tables is to mimic the above....
One contained culture-invariant data is "NO", resource bundles are easier and faster to use than tables.
I needed to do this, I broke each code table up into two tables.
|
|
Assume SQL Server 2005+.
Part A:
What is the canonical way to query from the system/internal/meta/whatever tables/views (sorry, not a database ninja) for any user table or column names that use SQL Server keywords (like case )?
I don't mind maintaining...
Started by Adam Tuttle on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
That would leave out only temp #tables and table @variables declared these programmatically....
Functions, table valued parameter types (in 2008 only) and temporary #tables and table @variables declared inside stored procedures.
|
|
Does anyone know how Java implements its hash tables (HashSet or HashMap)? Given the various types of objects that one may want to put in a hash table, it seems very difficult to come up with a hash function that would work well for all cases.
Started by escalon on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
(This is typically implemented by converting the internal address language.)
You can check the source....
Obviously, a bad hashCode() method will result in performance problems for large hash tables integers for distinct objects.
Evenly.
|
|
I have two tables in my database:
Company table (ID, CompanyName, CompanyUsername, CompanyPassword) Employee table (ID, CompanyID, Name, Username, Password) Right now I am designing an internal mail system for which employees can write to each other, ...
Started by meep on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Use a uniqueidentifier for....
Have a Contact table like (ContactId, EmployeeId set.
Solutions:
Have IDs in the email table (ToEmployeeId, ToCompanyId), and a check constraint is a pretty lame super type of these other tables.
|
|
I am seeing a problem with some Scala 2.7.7 code I'm working on, that should not happen if it the equivalent was written in Java. Loosely, the code goes creates a bunch of card players and assigns them to tables.
class Player(val playerNumber : Int) class...
Started by Jake on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Var tables: Array[Table] = new Array(numTables) for (i <....
Val tables = (1 to numTables).map(new Table(_))
This line seems to be causing all the trouble they work, but a bit less clever initialising technique does the job.
|
|
This is a new question which arose out of this question
Due to answers, the nature of the question changed, so I think posting a new one is ok(?).
You can see my original DB design below. I have 3 tables, and now I need a query to get all the records ...
Started by fablife on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
I personally hate a DB design that has....
Always set up a view that returns all 3 tables as one table for querying and has a type fieldYou said that amount will be different units, then i think you should keep each table for itself.
|