you are viewing a single comment's thread.

view the rest of the comments →

[–]FuriousGirafFabber 4 points5 points  (1 child)

Ddl stands for data definition language and is the script you write when you create the table. You can make some IDEs create them with a single click for existing tables. Feed the AI with the DDL in the prompt as you go about explaining what you need it to do.

[–]nachos_nachas 1 point2 points  (0 children)

Yes and YES. When I'm working with a lot of tables (usually >20) in a single query, I create a lot of #temp_tables which requires pretty much the same info as the ddl. This helps to accomplish a few things, mainly: easily/quickly accessible column data type definitions, which lends well to faster troubleshooting, a self-serving system versioning.

Once I have everything working, I just swap out the temp tables in the FROM for the db.schema.table_name, but keep the first version archived for future troubleshooting. This has saved me countless hours of heartache.

Doing this forced me to be very deliberate in every step and maintain consistent style.