Hi all,
What is the equivalent for Oracle's nested table concept in SQL Server ?
Is there anything like TABLE( ) function to select from nested table as in Oracle ?
Eg in Oracle :
SELECT t.* FROM TABLE(nested_table_datatype) t;
( like the above query used in Oracle PL/SQL and 'nested_table_datatype' is a table datatype created in Oracle using 'create type ...' syntax )
Please give the equivalent for above...
Thanks,
Samthank $deity, there is no equivalent in sql server, for nested tables are evil|||MS-SQL is a relational database. Oracle is a database with an SQL-like command language. There is a significant difference, neither one is inherantly better or worse than the other. They aren't comparable.
No relational database can have anything like Oracle's nested tables. Nested tables implicitly violate the first normal form.
In a relational database like MS-SQL, you can do exactly the same thing as a nested table by using a foreign key relationship. Create a second table using the same schema you would use for an Oracle nested table, adding a "link" column. Include the value from the "link" column in the parent row, so that you can join the main table to the logically "nested" table.
-PatPsql
No comments:
Post a Comment