Viewing 15 posts - 4,636 through 4,650 (of 7,191 total)
I believe so, but the only way to know for sure is to test it.
If your primary key is subject to change in the way you mention, you may consider...
March 7, 2012 at 7:34 am
Well, I don't know why it's working for me but not for you. Please will you run this and post the results:
SELECT
name
,OBJECT_NAME(parent_object_id) AS fk_table
,create_date
,modify_date
FROM
sys.foreign_keys
John
March 7, 2012 at 6:29 am
A stored procedure would probably be a good idea. You'll need to use dynamic SQL if it's going to run against different tables, so make sure you understand the...
March 7, 2012 at 5:23 am
OS error 32 means the file is already in use by another process. Could it be anti-virus software, or another SQL Server instance on the same computer? You...
March 7, 2012 at 5:12 am
I could give you a step-by-step guide, but you should be able to use a search engine to find something like that yourself. Is there a particular bit you...
March 7, 2012 at 5:07 am
Please will you post the statement you're trying to run?
Thanks
John
March 7, 2012 at 5:05 am
Use the task scheduler in Windows to run the command through sqlcmd.
John
March 7, 2012 at 4:50 am
Not quite. FK_Companies_Users is the name of the foreign key constraint, so you need to change that - you can't have two objects with the same name. [>Modified...
March 7, 2012 at 4:45 am
It worked when I tried it, but then I'm not using SQL Server Express. It's very fiddly and prone to error if you try to do stuff like this...
March 7, 2012 at 4:33 am
a.penasco (3/7/2012)
March 7, 2012 at 4:04 am
Please will you post DDL for the two tables, as well as (or including) the DDL for the foreign key constraints?
Thanks
John
March 7, 2012 at 3:26 am
Also, I don't think anyone's mentioned that you can have many unique indexes on a table, but only one primary key constraint.
John
March 6, 2012 at 5:50 am
Most people here will be loath to do your homework for you if you don't show any evidence of having attempted to do so yourself. I find that search...
March 6, 2012 at 4:48 am
I can think of two. Is this for homework, or an interview?
John
March 6, 2012 at 4:42 am
Ravi
I take it function1 is a function? sp_recompile only acts on stored procedures and triggers.
John
March 6, 2012 at 4:23 am
Viewing 15 posts - 4,636 through 4,650 (of 7,191 total)