SQL Questions

General technological topics without their own forum go here

SQL Questions

Post by wettlettuce on Wed Jul 29, 2020 10:14 pm
([msg=107364]see SQL Questions[/msg])

Hello I just had questions about SQL injections!
1)For one I'm not completely understanding the "null" value whenever you are inserting it in a column. For example: UNION SELECT table_name, table_schema, 'a', 'b'.... Now! this isn't complete code I know but pay attention to the 'a' and 'b' values. Isn't that practically the same thing as a "null" value because its a place holder for conjoining columns that don't have the same amount of tables. That's the first question regarding null.

2) This question is about table_schema.... is it possible that someone could rename explicitly the "table_schema" part or regardless EVERY server is going to have that as the saved name in the file that holds all the file names?

3) Okay this is the last question and I'm pretty positive that SQL isn't setup like this but here we go. Anywhom, whenever you are searching for a table could there be different tables stored in different directories? Like from what I've been learning about unix commands if you search for something in a certain directory and it isn't in there it will not show up. Do the same principles apply to SQL Injection? Or are they all stored in the same location?

I'm learning so if my questions don't exactly make much sense please feel free into correcting me on why it wouldn't make sense. Thank you!
New User
New User
Posts: 5
Joined: Tue Jun 30, 2020 4:40 pm
Blog: View Blog (0)

Re: SQL Questions

Post by pretentious on Thu Jul 30, 2020 6:55 am
([msg=107370]see Re: SQL Questions[/msg])

I'm not an expert in databases, but I'll do my best to answer.

I think you're right, NULL is used for clear syntax. In your first program, you might print out "hello world", this could also be anything else but that's not really the point. The point is that you're getting a print out. So yeah, for your purposes, null and anything else works the same way. Obviously in real systems, NULL has a real meaning because people aren't going to fill up their tables with garbage.

I think I'm too out of the loop to answer this one

I should be more adept at SQL than I am( little out of practice but here's how I understand it )
at least in relational postgres
a database server hosts databases
each database has tables/stored procedures/etc,
each table has rows and columns
If you've ever looked into object orientated programming, it follows a similar architecture. That's probably a closer analogy than a file system.

I recommend you download and install something like sqlite and just have a play. It doesn't have a super steep learning curve, and you're literally dealing with a single file so you aren't going to break anything
Goatboy wrote:Oh, that's simple. All you need to do is dedicate many years of your life to studying security.

IF you feel like exchanging ASCII arrays, let me know ;)
Can you say brainwashing It's a non stop disco
User avatar
Posts: 1219
Joined: Wed Mar 03, 2010 12:48 am
Blog: View Blog (0)

Re: SQL Questions

Post by Screwdrivers on Mon Feb 22, 2021 2:30 am
([msg=108956]see Re: SQL Questions[/msg])

That sounds good. For example, I wanted to clarify whether there are funding opportunities for taking courses like database courses. There's a huge range, and you can learn something effective and use it later because information relating to databases is very useful and can often find its application in almost all areas of programming.
New User
New User
Posts: 1
Joined: Mon Feb 22, 2021 2:27 am
Blog: View Blog (0)

Return to General

Who is online

Users browsing this forum: No registered users and 0 guests