I have attempted to create some dummy data from a select statement. I can easily create 1 column with 1 dummy data, or 2 columns with 1 dummy data, but how can I go about making 1 column with 2 dummy data(2 rows)?
(No column name)
dummy1
dummy2
Select statements that are 1 dummy data per column:
Select 'dummy'
Select 'dummy1','dummy2'
To use it, navigate to the link and insert a SQL command that defines the tables or use their dummy tables. Then click next and fill out your rows data types and settings for dummy data population. Then click next and generate the data. Wait.
Although the SQL standard doesn't allow a SELECT statement without a FROM clause, pretty much every other database does support the construct of selecting and expression without a FROM clause.
To get a single row randomly, we can use the LIMIT Clause and set to only one row. ORDER BY clause in the query is used to order the row(s) randomly. It is exactly the same as MYSQL. Just replace RAND( ) with RANDOM( ).
Just another option with one or multiple columns
Single Column
Select *
From (values ('Dummy1')
,('Dummy2')
) A(Dummies)
Returns
Dummies
Dummy1
Dummy2
Multiple Columns
Select *
From (values ('Dummy1',1)
,('Dummy2',2)
) A(Dummies,Value)
Returns
Dummies Value
Dummy1 1
Dummy2 2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With