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
AI Thread Summary
The discussion focuses on implementing the object_definition function in SQL Server with two parameters, specifically object_id and column_id. The user seeks clarification on what this function does and where its returned value is stored. Participants encourage hands-on experimentation with SQL Server, suggesting that the user run the function themselves to gain practical understanding. The user successfully downloaded SQL Server 2016 Express and learned about T-SQL, discovering how to retrieve schema and table IDs using objectproperty. Overall, the conversation emphasizes the importance of self-exploration and practical application in learning SQL Server functions.
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 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 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 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 WWGD
Back
Top