How Do You Implement Object_Definition with 2 Parameters in SQL Server?

  • Thread starter Thread starter Pepper Mint
  • Start date Start date
  • Tags Tags
    Definition Server
Click For Summary

Discussion Overview

The discussion focuses on the implementation of the object_definition function in SQL Server, specifically with two parameters. Participants explore its functionality, usage, and related concepts within T-SQL.

Discussion Character

  • Exploratory
  • Technical explanation
  • Homework-related

Main Points Raised

  • One participant seeks help in understanding the implementation of the object_definition function with two parameters, specifically asking for clarification on its purpose and output.
  • Another participant questions the original poster about their prior research and specific questions, indicating a desire for more context.
  • A participant mentions that the function returns a text string and expresses uncertainty about where this value is sourced from.
  • Suggestions are made to consult MSDN for more information on T-SQL functions like OBJECT_DEFINITION and OBJECTPROPERTY.
  • Some participants emphasize the importance of self-research before seeking detailed answers, referencing forum policy on providing assistance.
  • One participant encourages executing the function directly in SQL Server to gain practical understanding.
  • A later reply indicates that the original poster has downloaded SQL Server 2016 Express edition and is eager to learn more about T-SQL.
  • Another participant expresses enthusiasm about the original poster's progress and encourages sharing outcomes from their exploration.
  • The original poster shares that they have learned how to obtain schema ID and table ID using OBJECTPROPERTY.

Areas of Agreement / Disagreement

Participants generally agree on the importance of self-research and practical experimentation, but there is no consensus on the specific implementation details of the object_definition function with two parameters.

Contextual Notes

Some participants express uncertainty about the exact output and source of the value returned by the object_definition function, indicating a need for further clarification on definitions and usage.

Pepper Mint
Messages
91
Reaction score
139
Hello experts,
I would like to learn the implementation of object_definition function in SQL server. I'd like the one with 2 parameters. Could you help me ? Thank you.
 
Last edited:
Technology news on Phys.org
What have you learned so far from reading and researching? Do you have specific questions?
 
DaveC426913 said:
What have you learned so far from reading and researching? Do you have specific questions?
I would like to know what this does in SQL Server
e.g object_definition(object_id, column_id)
I know it will return me something, e.g a text string and I think this returned value should be stored somewhere else I just have no clue where it is taken from. I think someone here would probably know this better than I do.
 
Pepper, it is PF's policy to not spoon-feed answers to member questions. It is actually a rules requirement that you make some effort to find an answer yourself before we can give much more help than provding hints and pointing you at reading material.
 
  • Like
Likes   Reactions: Pepper Mint
Pepper, why don't you execute it, i.e., run it? If you don't have SQL server, it is easy to download a free copy.
 
  • Like
Likes   Reactions: Pepper Mint
WWGD said:
Pepper, why don't you execute it, i.e., run it? If you don't have SQL server, it is easy to download a free copy.
Thanks WWGD, I just ownloaded SQL Server 2016 Express edition and learn something new about T-SQL. :partytime:
 
  • Like
Likes   Reactions: WWGD
Pepper Mint said:
Thanks WWGD, I just ownloaded SQL Server 2016 Express edition and learn something new about T-SQL. :partytime:
No problem, glad you did, why don't you tell us how it turned out?
 
Last edited:
WWGD said:
No problem, glad you did, why don't you tell us how it turned out?
It turned out to be really cool. I know how to get schema id, table id with objectproperty.
 
  • Like
Likes   Reactions: WWGD

Similar threads

  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 18 ·
Replies
18
Views
4K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 9 ·
Replies
9
Views
5K
  • · Replies 51 ·
2
Replies
51
Views
6K
Replies
5
Views
3K
  • · Replies 17 ·
Replies
17
Views
3K
Replies
13
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K