Description
Properties
| Name | Value |
|---|---|
| File Collation | |
| File Group | |
| Filestream File Group | |
| Is Partitioned | False |
| Partitioned Column | |
| Partition Scheme | |
| File Groups | |
| Filestream Partition Scheme | |
| Filestream File Groups | |
| Heap | True |
| Full Text Catalog | |
| Full Text | |
| Compression | NONE |
| Row Count (~) | 0 |
| Created | 3/6/2025 6:55:55 PM |
| Last Modified | 3/6/2025 6:55:57 PM |
Columns
2Indexes
1Foreign Keys
2| Name | Columns | Description |
|---|---|---|
| FK__usuarios___filia__1AB4CD6A | filial | |
| FK__usuarios___user___1BA8F1A3 | user_id |
SQL Script
Copy
CREATE TABLE dbo.usuarios_filiales (
filial smallint NOT NULL,
user_id int NOT NULL,
PRIMARY KEY NONCLUSTERED (filial, user_id) WITH (FILLFACTOR = 90)
)
ON [PRIMARY]
GO
ALTER TABLE dbo.usuarios_filiales
ADD FOREIGN KEY (filial) REFERENCES dbo.filiales (filial)
GO
ALTER TABLE dbo.usuarios_filiales
ADD FOREIGN KEY (user_id) REFERENCES dbo.users (user_id)
GO
filial smallint NOT NULL,
user_id int NOT NULL,
PRIMARY KEY NONCLUSTERED (filial, user_id) WITH (FILLFACTOR = 90)
)
ON [PRIMARY]
GO
ALTER TABLE dbo.usuarios_filiales
ADD FOREIGN KEY (filial) REFERENCES dbo.filiales (filial)
GO
ALTER TABLE dbo.usuarios_filiales
ADD FOREIGN KEY (user_id) REFERENCES dbo.users (user_id)
GO
Depends On
2Used By
No items found